0
Having trouble understanding why this won't run on my desktop:
def dig(x): y=0 for anything in range(x): y += anything return y pint (dig(10))
5 odpowiedzi
+ 7
There are 2 errors
The y += anything line has to be indented in the for loop.
pint() doesn't work. Try print() 😉
+ 1
if this is in python, you must indent correctly the for body
+ 1
Of course. Thankyou sir.
0
True. Only exaggerated to make it viewer-friendly.
0
Notwithstanging, I figured this program should run in the playground. "Why not on a desktop?" I remain clueless.