Nov-24-2019, 09:24 PM
Hey fellas .
I've been trying to learn bunch of stuffs about modules and imports in Python , meanwhile I was stopped because of some codes in which I can't quite get the actual concept behind it's mechanism & how it works .
This is the code
Thanks
I've been trying to learn bunch of stuffs about modules and imports in Python , meanwhile I was stopped because of some codes in which I can't quite get the actual concept behind it's mechanism & how it works .
This is the code
import time from time import time as my_timer import random input("Please enter to start") wait_time = random.randint(1, 6) time.sleep(wait_time) start_time = my_timer() input("Press enter to stop") end_time = my_timer() print("Started at " + time.strftime("%X", time.localtime(start_time))) print("Ended at " + time.strftime("%X", time.localtime(end_time))) print("Your reaction time was {} seconds".format(end_time - start_time))I really appreciate if someone could just explain line by line of this code and what is really does for us . Cause I don't have any problems with running the code . I just want to comprehend the lines of code .
Thanks