0

Whats wrong?

a=input() b=input() c=a+b print (c)

8th Feb 2020, 9:40 AM
Саша Думов
Саша Думов - avatar
4 ответов
+ 9
The input will take a string value. So if you enter a=1 and b=2, c will print "12". You can wrap it in either the int() or float() to get the correct sum. a=int(input()) b=int(input()) c=a+b print(c) #3
8th Feb 2020, 9:58 AM
Duncan
Duncan - avatar
+ 6
Only input () will take String value so you should do typecast with int like this int(input()) for numeric value
8th Feb 2020, 9:44 AM
A͢J
A͢J - avatar
+ 5
Indentation 3rd line's wrong. What do I win?
8th Feb 2020, 10:07 AM
HonFu
HonFu - avatar
+ 2
hey.... u did it👍👍
8th Feb 2020, 12:47 PM
Oma Falk
Oma Falk - avatar