We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe21217 commit d588b46Copy full SHA for d588b46
1 file changed
PyPortal_Halloween_Countdown/code.py
@@ -103,15 +103,8 @@
103
pyportal.set_caption('', (13, 215), 0x000000)
104
while True: # that's all folks
105
pass
106
- secs_remaining = remaining % 60
107
- remaining //= 60
108
- mins_remaining = remaining % 60
109
110
- hours_remaining = remaining % 24
111
- remaining //= 24
112
- days_remaining = remaining
113
- print("%d days, %d hours, %d minutes and %s seconds" %
114
- (days_remaining, hours_remaining, mins_remaining, secs_remaining))
+ days_remaining = remaining // 86400
+ print("%d days remaining" % (days_remaining))
115
countdown_text.text = '{:>3}'.format(days_remaining)
116
pyportal.set_background(backgrounds[random.randint(0, 17)])
117
0 commit comments