Help on how to create a simple calculator
Write a program to take two integers as input and output their sum. Sample input: 2, 8 Sample output: 10
Anonymous , i suppose this question is relared to ths *python core* tutorial. (exercise17) all coding for code coach exercises can not have any user prompt inside the input() function. if this is not taken into account, the code will not pass the test cases. also all additional output that is not requested will create errors when running the code.
Post your tried code..
Anonymous that's hard coded and not what the question asks, you need to take two inputs.
Ausgrindtube if we have to take input and enter the data by user, then code will be:- a = int(input("Enter the number 1:") b = int(input("Enter the number 2:") print ("The addition is:", a+b)
num = int(input ()) Print "num"
Make two vars with input and put them together
a = 2 b = 8 print (a+b)
What's wrong? :(
Why won't my image display
I have made a calculator in which my % (Percentage) not work correctly for 100%50 or 100%20.
How the answer is 50?
Number of Ones ( C++ ) question!