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.

15th Nov 2024, 5:06 AM
Safi
Safi - avatar
1 ответ
+ 7
Speed is not the same as speed. Python is case-sensitive. It is convention to use lower case for variables. Class names 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:
15th Nov 2024, 5:17 AM
Bob_Li
Bob_Li - avatar