+ 1
How do you use the if function to say stuff like if x=y do this?
6 odpowiedzi
+ 5
Your code should be like this
Operating_System = "Windows10"
if Operating_System == "Windows10":
print("OS updated")
else:
print("please update OS")
ERROR
1.You have to enclose strings with quotes
2.You have to use colons after if and else statements
+ 3
if x == y:
#TODO
Don't forget to take this course
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2277/
+ 2
Diogo Beijinha can you post the code here so we can figure out what happm actually
+ 1
Seniru Pasan excuse all my mistakes XD.. I just started out python and it's my first time learning a programming language.. open to all the help I can get
https://code.sololearn.com/cO7z7249hSk2/?ref=app
+ 1
Seniru Pasan thank you so much! It finally worked. I completely forgot about that
0
Seniru Pasan but I've tried doing if windows10 == windows10 print updated and it gives a syntax error.. I've tried with and without quotation marks and it always gives a syntax error