0
Speed = 740 if speed >= 500 print(Slow down!) elif: print("a little slower please.") else: print("your fine.")
I made this python code when I hit run it says error in line 2 please figure this out for me.
1 Réponse
+ 6
Speed is not the same as speed.
Python is case-sensitive. It is convention to use lower case for variables. Classnames are Capitalized, snake_case is preferred for compound words...
so it should be:
speed = 740
if also needs the ':' at the end
if speed >= 500:
also Slow down! needs to be enclosed in " " to be a proper string.
print("Slow down!")
elif needs a condition, so something like:
elif speed>200: