0

Why wherever I try to run the code below i doesnt let me in python but it let me in this app

x = int(input()) for i in range(1, x,2): if i % 3 == 0 and i % 5 == 0: print("SoloLearn") elif i% 3 == 0: print("Solo") elif i % 5 == 0: print("Learn") else: print(i)

12th Nov 2020, 2:46 AM
Juan Mejia
Juan Mejia - avatar
5 Answers
+ 8
Juan Mejia It looks like you didn't input any integer or string. So, try giving a proper input which should be an integer like "15"
12th Nov 2020, 5:15 AM
Simba
Simba - avatar
+ 5
Juan Mejia , the error message indicates clearly that you have input an empty string, which means that you you have pressed the return key, but nothing else.
12th Nov 2020, 9:03 AM
Lothar
Lothar - avatar
+ 2
it looks like you're inputting a string instead of an integer. try only inputting numbers. no quotes.
12th Nov 2020, 3:23 AM
Brian R
Brian R - avatar
+ 1
your python version may not be up to date. could you send the error you get?
12th Nov 2020, 2:59 AM
Brian R
Brian R - avatar
0
x = int(input()) ValueError: invalid literal for int() with base 10: ''
12th Nov 2020, 3:03 AM
Juan Mejia
Juan Mejia - avatar