Can someone help me fix this? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone help me fix this?

i started coding today and i made an code while experimenting with the basics of coding, but my code doenst work, can someone give me some tips and tell me what is wrong with it? https://sololearn.com/compiler-playground/cvYp9cAe9K6d/?ref=app the code is in brazilian portuguese btw

15th Mar 2024, 12:35 AM
Beluga
Beluga - avatar
3 Answers
+ 2
1. The indentations are wrong. For example, line 2 doesn't need indentation, so as line 4 to 7. 2. The if statements are wrong. It should be: if something == True: do something else: do another thing It needs double equal signs to check if two things are equal. A single equal sign is an assignment. Also pay attention where the colon is placed. 3. Again, it is the if statement. If you want to check if the variable Ação contains a specific value, use Ação == "value". Without a quote, value is treated as a variable.
15th Mar 2024, 3:46 AM
Wong Hei Ming
Wong Hei Ming - avatar
15th Mar 2024, 1:04 AM
JaScript
JaScript - avatar