-2
기본적으로 내 프로그램에 높은 점수를 기록하고 싶습니다. 나는 코딩에 익숙하지 않아 약간의 도움이 필요하다. 나는 내가 원하는 것을 보여주기 위해이 기본 프로그램을 만들 것이다.파이썬에서 가장 빠른 시간을 녹음합니다.
import time
name = input("Please enter your name: ")
mylist=["Man utd are the best team","I am going to be a pro typer.","Coding is really fun when you can do it."]
x=random.choice (mylist)
print ("The sentence I would like you to type is: ")
print (x)
wait = input ("Please press enter to continue, The timer will start upon hitting enter!")
start = time.time()
sentence = input("Start typing: ")
end = time.time()
overall = end - start
if sentence == (x):
print ("It took you this many seconds to complete the sentence: %s" % overall)
if overall <= 9:
print ("Nice job %s" % name)
print ("You have made it to level 2!")
시간이 얼마나 걸릴 수 있습니까? 누군가가 새로운 점수를 받으면 어떻게해야합니까?
기록 하시겠습니까? –