+ 1

How to add 2 calculations in one code (for example : 3+6 and 11+22) and 2 different answer

Coding

29th Oct 2020, 9:10 AM
SOHAM
SOHAM - avatar
7 Réponses
+ 2
print(int(input()) + int(input()), int(input()) + int(input()))
29th Oct 2020, 10:09 AM
Yurii Ostapenko
Yurii Ostapenko - avatar
+ 2
Try x = 3+6 y = 11+22 print (y) print (x)
30th Oct 2020, 7:41 AM
Jeremiah B. Kashililika
Jeremiah B. Kashililika - avatar
+ 2
Or is two different
30th Oct 2020, 7:41 AM
Jeremiah B. Kashililika
Jeremiah B. Kashililika - avatar
+ 1
Thanks
29th Oct 2020, 9:22 AM
SOHAM
SOHAM - avatar
+ 1
""" I think you do this by using a function with two arguements. Try the sample function below. """ def addnums(a,b): sum = a + b retun sum print(addnums(2,11)) print(addnums(6,12))
1st Nov 2020, 6:36 PM
Kurien Varappettil
Kurien Varappettil - avatar
0
Try this. print(int(input()) + int(input()), int(input()) + int(input())) and more i hope it will work
29th Oct 2020, 4:20 PM
Jeremiah B. Kashililika
Jeremiah B. Kashililika - avatar
0
No its not working
30th Oct 2020, 4:10 AM
SOHAM
SOHAM - avatar