0

How to get different output (9 and 33) at the same time? Take two integers and output their sum. (Module: Strings and variables)

Simple Calculator, Pls help with that question im new in using Python.

24th Feb 2021, 12:44 PM
雪羽Kamiko
雪羽Kamiko - avatar
11 Answers
+ 5
Share your code/attempt. It's something like...if it has asked Square of 3, which is 9 [ 3*3 =9] Power / exponential of 27, again answer is 3 [because 27 = 3*3*3] However, without code snippets or proper question asked 🤔 I am just assuming you might be looking for something like this.
24th Feb 2021, 12:53 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 4
雪羽Kamiko If the problem is asking you to take user input() and output their sum. Try to learn again input() lesson & understand, how inputs are taken. When you are taking user input that returns type of string as Abhay mentioned above. So, here basically you are not going to assign any value to a & b variables / num1 & num2. You will have to take input() & print your function by adding them. Same like @Abhay shared above 👆 Hope this helps you to understand.
24th Feb 2021, 1:08 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 3
I have no clue of what you mean by 9 and 33 at the same time but if you want you add two numbers , num1=int(input()) num2=int(input()) print(num1+num2) """input function default return type is a string"""
24th Feb 2021, 12:54 PM
Abhay
Abhay - avatar
+ 3
雪羽Kamiko , where is your code that you did for trying to solve your problem?
24th Feb 2021, 12:59 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 3
雪羽Kamiko you don't need to put 6 and 3 yourself , sololearn provides inputs as 3 and 6 and and 11 and 22.
24th Feb 2021, 1:06 PM
Abhay
Abhay - avatar
+ 2
雪羽Kamiko do what i as told and it will work fine, 6 and 3 are inputs for first test case , 11 and 22 are inputs for second case , you don't need to worry about both , sololearn will test your code for each test case.
24th Feb 2021, 1:04 PM
Abhay
Abhay - avatar
+ 1
Abhay Mhm i got it thanks
24th Feb 2021, 1:07 PM
雪羽Kamiko
雪羽Kamiko - avatar
+ 1
Shivani 📚✍ ok thank you very much
24th Feb 2021, 1:09 PM
雪羽Kamiko
雪羽Kamiko - avatar
0
Shivani 📚✍ Abhay Sample input 2 8 Sample output 10 But i need to get 9 and 33 at the same time, i have no clues about it :|
24th Feb 2021, 12:55 PM
雪羽Kamiko
雪羽Kamiko - avatar
0
Shivani 📚✍ i tried Abhay one num1=int(input()) num2=int(input()) print(num1+num2) But its not working for that question :| i put 6 in num1 and 3 in num2 it returns 9 is ok but how can i get 33 at the same time
24th Feb 2021, 1:03 PM
雪羽Kamiko
雪羽Kamiko - avatar
0
Abhay Ok i solved it lol i mistyped something.
24th Feb 2021, 1:05 PM
雪羽Kamiko
雪羽Kamiko - avatar