+ 2
Why this doesn't work ?
So I've tried this code in another Website and it works just fine, but here it seems like it doesn't want to work https://sololearn.com/compiler-playground/cUhqeMEM3mbb/?ref=app
4 ответов
+ 8
Rebecca Harris ,
your code is ok, so you may struggle with the input in sololearn playground.
> after pressing the `run` button, a popup window appears.
> we have to enter all inputs in advance.
> each input has to be in a new line e.g:
3 (press enter)
+ (press enter)
5 (click submit)
> then finally click `submit` from the popup window.
+ 4
Hi Rebecca, avoid using prompts in the input functionnfor code playground, just use "input()". It won't display in the prompt anyway but will print it to the console at the end, which can cause code coaches to fail as your output doesn't "match".
+ 2
For some reasons when I choose 3,5 inputs
It gives me :
"Number? Number? 8"
How to make it only 8?
+ 1
To make it only eight you can remove the "Number? " from the inputs.
then if you want them to show up and actually say what number you chose i recommend doing it like this:
a=int(input())
print("1st number: ",a)
b=int(input())
print("2nd number:",b)
print("addition: ",a+b)