Python 基礎(chǔ)教程
題目:時間函數(shù)舉例4,一個猜數(shù)游戲,判斷一個人反應(yīng)快慢。
程序分析:無。
程序源代碼:
以上實例輸出結(jié)果為:
do you want to play it.('y' or 'n')y input a character: 5 please input number you guess: input your guess: 60 …… please input a little bigger input your guess: 29 please input a little smaller input your guess: 28 3.81868131868e-05 you are very clever! Congradulations The number you guess is 28 do you want to play it.其他擴展