我有一個遊戲,我做了,而不是想要高分功能我想要一個低分功能。python中的bestscore Idle
我還沒有看到一個工作lowscore功能到目前爲止我曾嘗試創建自己的,但我是一個相當新的程序員
def reaction():
import time
import sys
print("Split second reaction")
print("*********************")
time.sleep(1)
print("Ready")
time.sleep(1)
print("Set")
time.sleep(1)
print("Go!")
start = time.time()
g=input()
end = time.time()
score=end - start
highscore=open("record is in this document:")
if score<highscore:
print("New Highscore! "))
highscore=score
else:
print("Highscore:",highscore)
reaction()
你的輸出是什麼? – Adi219
帶記錄號的記事本文件 –
您看到什麼發生,您想要發生什麼? –