0
input problem
guy, can you find the problem? s=input()*2 a=input()*s b=(input()+a)-2 print(s) print(a) print(b)
4 Answers
+ 5
input returns what you typed as a string. You have to convert the input to an int before using it in an expression.
s=int(input())*2
a=int(input())*s
b=(int(input())+a)-2
print(s)
print(a)
print(b)
+ 1
Every input is a string type. Even if you input a number. If you want another type, you have to convert the input.
example:
a = input () # input f.e. 5
b = int (a) # here you convert the string '5' to
integer 5
0
guy i'm impressed!! thank you!!
- 1
_"hi" pls give the answer