Why this code is error when I give positive integer? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why this code is error when I give positive integer?

a = input ('Enter a positive number:') a = int(a) if a > 0: a = m print(m) else : print('Wrong Input')

18th May 2019, 9:03 AM
Jahin Mahruf
Jahin Mahruf - avatar
2 Answers
+ 11
Your error this a = m ❌ m = a ✔️
18th May 2019, 9:08 AM
Mawlood Fareq
Mawlood Fareq - avatar
+ 1
Yeah, I have got. Thanks buddy..
18th May 2019, 9:10 AM
Jahin Mahruf
Jahin Mahruf - avatar