+ 2
I need help
Ok so I found the simple solution. That's simply subtracting 3 to get 9 from 12. But I wanted a better approach. I want it to count down from 12. 12 11 10 9 (prints answer) Link below https://code.sololearn.com/cMcOsHPcQ6vr/?ref=app
2 Antworten
+ 2
time = 12
for i in range(time, -1, -1): # 12, 11, 10, ..., 1, 0
print(i)
if i == 9:
print("Alarm will go off")
break
+ 1
Usama Bin Mamun come on coach 🙏🏿