+ 15
Or why is it not working now?
5 Answers
+ 20
VuÄko, nisam struÄnjak za Python...ali koliko vidim kompajler ti javlja sintaksnu greĆĄku u liniji 10:
print :("c")
Trebalo bi da napiĆĄeĆĄ ovu liniju bez dvotaÄke :
print ("c")
+ 6
When you run into errors, read the error message so you know what's going on and can resolve it. It even lets you know exactly what line it's on, and most of the time it displays the portion of code also.
:::: YOUR ERROR MESSAGE ::::
File "..\Playground\", line 10
print:("c")
^
SyntaxError: invalid syntax
^The means of resolving your problem is directly stated in your error message. It even has an arrow pointing at it for you. You're using invalid syntax for the print function. Look at your other print functions and then look at that one.
Hope that helps!
+ 3
Sintakanu greĆĄku u liniji 10. Trebalo bi da napiĆĄeĆĄ ovu liniju bez dvotaÄkite kako sto spomna @LukArToDo.
+ 2
#it works if at print:(c),remove :
try:
word = "spam"
print(word / 0)
except:
print("An error occurred")
try:
x = "egg"
print (x/0)
except:
print("c")
''' practice repeatedly . don't worry, you are doing good '''