0

How to use the command INPUT on this app? At never works...

I tried to make a program to say something when I input a certain number, it works fine on PC, but it doesn't at this app.

10th Nov 2017, 12:13 AM
Marcelo Pereira
Marcelo Pereira - avatar
14 Antworten
+ 3
2 mistakes: - To compare you use in this case == because = is to assign - If statement, at the end of condition must to have : First mistake is too common so dont worry but understand it. Second is about Python sintax so you need to check better Sololearn course
10th Nov 2017, 1:00 AM
Daniel
Daniel - avatar
+ 4
Sorry, was busy, but @Daniel is correct. Entrada = float(input('Digite um número aleatório: ')) if Entrada == 10: print ('Parabéns') Remember a single equals sign = is assignment and a double equals sign == is used for comparison.
10th Nov 2017, 1:16 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
If there is more than one input needed, you'll need to provide them all at the prompt on a separate line. Otherwise, please post your code or a link to it.
10th Nov 2017, 12:32 AM
ChaoticDawg
ChaoticDawg - avatar
10th Nov 2017, 12:55 AM
Marcelo Pereira
Marcelo Pereira - avatar
+ 1
Here it is!
10th Nov 2017, 12:56 AM
Marcelo Pereira
Marcelo Pereira - avatar
+ 1
Thanks dude, I'll take a look at it!
10th Nov 2017, 1:11 AM
Marcelo Pereira
Marcelo Pereira - avatar
0
When I run it, it says "It seems your program needs an input", I type the right number and nothing happens, just an error.
10th Nov 2017, 12:15 AM
Marcelo Pereira
Marcelo Pereira - avatar
0
Entrada = float(input('Digite um número aleatório: ')) if Entrada = 10 print ('Parabéns')
10th Nov 2017, 12:34 AM
Marcelo Pereira
Marcelo Pereira - avatar
0
that's my code
10th Nov 2017, 12:34 AM
Marcelo Pereira
Marcelo Pereira - avatar
0
Share link to your code into your profile. Maybe the problem is with indentation
10th Nov 2017, 12:48 AM
Daniel
Daniel - avatar
0
Marcelo not copy/paste code. In Sololearn you can save codes so when you are posting you can insert link to your code
10th Nov 2017, 12:53 AM
Daniel
Daniel - avatar
10th Nov 2017, 12:59 AM
Daniel
Daniel - avatar
- 1
I already did.
10th Nov 2017, 12:50 AM
Marcelo Pereira
Marcelo Pereira - avatar
- 1
I didn't know I could do that, my apologies, I just found the button which says "+ Insert" hehe
10th Nov 2017, 12:55 AM
Marcelo Pereira
Marcelo Pereira - avatar