0
Why does this still show error?
Why does this code still show error even after the suggestions I received? https://code.sololearn.com/cTDgQKCCuj65/?ref=app
8 Respuestas
+ 4
BTW your code works. You just have to input the values on a sperate line.
Correct
12
12
x
Not Correct
12 12 x
+ 6
What suggestions did you receive. If it is still part of the same question you've asked before then why not continue to ask question about it on the same post. So we don't end up being redundant with our answers?
+ 5
AARAV PANDEY ,
as already mentioned here, the code is working properly. may be you have some issues with the input procedure of plyaground.
sample input:
4 (press enter key)
3 (...)
x (press submit)
suggestions:
- we do need additional parenthesis around input() function
- insert spaces as done in the sample:
integer1 = int(input())
integer2 = int(input())
sign = input()
if sign == "x":
print(integer1 * integer2 )
+ 4
I did not receive an error and got the expected output. What is the specific one you are receiving?
+ 3
THANKS , MY FAULT
I WAS ENTERING
Ex-
12
x
12
+ 2
AARAV PANDEY You have to make sure your entering input in the exact order that you are receiving it in your code.
So if you are asking for:
interger1
sign
integer2
Then what you did could have worked, but you put the integer inputers twice in a row and the sign last in your code. Order of input is very important even in function parameters.
+ 2
https://code.sololearn.com/ccYrOnA131hg/?ref=app
THANKS ALL OF U . THE CODE IS READY.
0
AARAV PANDEY You're welcome.