0

What's wrong with my code/Что в моем коде не так /

# место для вашего кода num1 = int(input) num2 = int(input) print (num1) print ('+') print (num2)

6th Jan 2022, 10:24 PM
FeRoSs
FeRoSs - avatar
3 ответов
+ 2
input is a python built-in function. Converts input(prompt) to eval(input(prompt)). you missed prompt parameter. with parameter: num1 = int(input(" " ) num1 = int(input("enter number" ) but still, you will not get output for ('+') and (num2). if you intend to add them create 3rd variable num3=num1+num2 and print(num3)
6th Jan 2022, 10:48 PM
Abrham Yohannes
Abrham Yohannes - avatar
+ 2
Abrham Yohannes you've missed 2 parentheses. And there is no need for 3rd variable, you can just print the sum of both nums.
7th Jan 2022, 12:12 AM
Devnull
Devnull - avatar
0
Devnull Is there an example of a calculator only for addition?
7th Jan 2022, 12:16 AM
FeRoSs
FeRoSs - avatar