0
Why isn't working properly??
Taks: Write a code to print the no of seconds you have logged when you hit the enter Here's my try: import threading import time def func(): cou=0 while True: time.sleep(1) cou=cou+1 print(f"you have logged for {cou} secs") t = threading.Thread(target=func,daemon=True) t.start() p = input("Enter the enter:")
2 Answers
0
Yes show me the code
- 1
Why we need to define "cou" as global variable?