I have created a program in class 'make a game that tests how good people are 
at guessing when 10 seconds has elapsed.'

The following are the code I currently have and the error produced when I 
attempt to run it. I have tried everything I can think of to resolve the issue, 
and I have also run the code through a checker, which has said that there are 
no mistakes. I have also shown a friend who is a programmer, and he cannot find 
a problem with it. The teacher doesn't actually know the solution to the 
problem so I was wondering if someone could point me in the right direction to 
get this working please?



import time

def second(int):
    time.strftime("%S")
    
start = input('Press enter when you are ready to start')
time1 = time.strftime("%S")

then = time.time()

end = input('Press enter when you think 10 seconds has passed')
time2 = time.strftime("%S")

def totaltime(int):
    (time2-time1)

if totaltime == '10':
    print ('YOU ACTUALLY DID IT')
    
if totaltime < 10:
    print ('Haha you took too long! Your result was:', totaltime,'seconds')

if totaltime > 10:
    print('Too early TRY AGAIN! Your result was:', totaltime, 'seconds')





Press enter when you are ready to start
Press enter when you think 10 seconds has passed
Traceback (most recent call last):
  File "E:/Computing/Python/Little book of challenges/Challenge 6 10 seconds 
experiment.py", line 20, in <module>
    if totaltime < 10:
TypeError: unorderable types: function() < int()
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to