+ 1
why this code doesn’t work?
print( x := int(input) + y := int(input())) P.S. i know that you can do it way simpler than that im just curious why this is mistake
3 ответов
+ 1
Missing () for first input()
And put braces around y assingment
print( (x := int(input()))+ (y := int(input())))
+ 2
print( (x := int(input())) + (y := int(input())))
print((str(3))+str(5))
print('The sum is %.1f' %(float(input('Enter first number: '))+float(input('Enter second number: '))))
Only missing braces
+ 1
Jayakrishna🇮🇳 thank you very much, i was feeling really stupid at the moment :D