猜數(shù)字游戲python循環(huán) 用python制作一個簡單的猜數(shù)字游戲?
用python制作一個簡單的猜數(shù)字游戲?Key=40 while(1):guess=input(“please input a number:”)if(guess<key):print“猜錯了,小
用python制作一個簡單的猜數(shù)字游戲?
Key=40 while(1):guess=input(“please input a number:”)if(guess<key):print“猜錯了,?。 癊lif(guess>key):print”錯了,big!“Elif(guess==key):print”很聰明,你猜對了!“突破字數(shù)限制,自行排版
msgboxif(the guess& GT)。&quot?&quot,IIF(the guess
n=n1
loopwhiletheguess
dimtherangeaslong
dimthernumberaslong
dimnaslong
dimnaslong
therange=InputBox(“the number please specify the number range”times>)更小)
thenumber=int(rnd()*range)
n=1
do
the guess=InputBox(“the number”endsub
沒有美化