0

Python - Simple Calculator

I started over with learning Python on Sololearn and was puzzled by the Simple Calculator. I can't resolve the issue and I don't know what the problem is. What am I doing wrong and can someone help me? https://www.sololearn.com/learning/eom-project/1073/615 num1 = int(input(6+3)) operator = intput(num1) num2 = int(input)

28th Feb 2021, 12:03 PM
Bbrbk
8 Answers
+ 2
in the first line, 6 + 3 is inside the input() call. No need to do that. You can read/enter a number by taking that out: num1 = int(input()) the second line input is spelled wrong and "int" shouldn't be in the input() function call the third line only contains a reference to the input function. You need to call it by using parenthesis. it'll look like: num2 = int(input()) # <-- see the extra set?
28th Feb 2021, 12:31 PM
Slick
Slick - avatar
+ 2
I did it x = int(input()) y = int(input()) z = int(x) + int(y) print(z) Oh my God
28th Feb 2021, 5:07 PM
Bbrbk
+ 1
The link won't open. Try copying the code and pasting it in the playground. Then, just copy a link to the code and paste it in the description here so we can see your code.
28th Feb 2021, 12:09 PM
Slick
Slick - avatar
+ 1
I have written num1 = int(input()) operator = (num1) num2 = int(input(num1)) And than I have Output 6 Why?
28th Feb 2021, 1:00 PM
Bbrbk
+ 1
operator would need to equal input() and num 2 would be the same as num1. Bbrbk Also, i don't understand how you're getting any output at all. Please do what was requested in the first answer.
28th Feb 2021, 1:01 PM
Slick
Slick - avatar
+ 1
Yo, I'm an idiot and I can still put a few lines together. You messing up is the way to learn what not to do. Really the only way to find out. Just keep trying and post your new attempt each time if you still have questions
28th Feb 2021, 1:22 PM
Slick
Slick - avatar
+ 1
I'll take a short break and repeat this lesson
28th Feb 2021, 1:43 PM
Bbrbk
0
I don't know what to do anymore. I think I'm too stupid to code
28th Feb 2021, 1:17 PM
Bbrbk