+ 6
Hello!! Can someone please tell me how to write an algorithm for adding two input numbers?
54 Réponses
+ 10
n1 = int(input())
n2 = int(input())
print(n1 + n2)
+ 3
you made a few mistakes: all statements must start with a small letter. when you declare a variable and assign it an input, you don't need to write anything inside, remove the quotation marks from there, too. immediately convert this value to an integer. do not immediately print the entered value to the screen. perform an arithmetic operation on two numbers and display the result on the screen
+ 2
Yeahh i did ittt
+ 2
you wrote quite a working program, but alas, the requirements of the tests are different and we must follow them. from now on, read the task carefully and do everything literally. right down to the output of each word. if the word should be capitalized - type with a capital letter. no personal interpretations. this is a guarantee of success
+ 2
Thanks for your advice
+ 2
good luck and happy coding!
+ 2
Step 1: Start
Step 2: Assign two numbers A and B
Step 3: Sum of A and B is C
Step 4: Add A and B
Step 5: Print the value of C
Step 6: Stop
+ 1
Hi! What exactly is your problem?
+ 1
Write a program to take two integers as input and output their sum.
Sample Input:
2
8
Sample Output:
10
+ 1
I wrote :
Input1=input('first number:')
Print(Input1)
Input2=input('second number:')
Print(Input2)
Print(int(Input1) +int(Input2))
+ 1
at what stage did you have a problem? have you tried writing code? can you show it off?
+ 1
I put int() cz i want to add the two numbers as quantities and not as strings
+ 1
OKayy thnxx
+ 1
I would be delighted if you write me the operation and the steps so i can clearly see where am wrong
+ 1
In fact i am learning python just for fun and for knowledge though i am a biology masters student :pp
+ 1
haha, my specialty is agronomist for plant protection, although I work as an engineer for the installation of security and fire alarms, video surveillance
+ 1
Ahh cooll!!
+ 1
I checked your code, it was not so bad
+ 1
What code??