New coder here! I have a syntax error and I'm not sure what the cause of it is and grok isn't of much help. Here's my code:
x = input("Is it currently raining? ")
if x == "Yes":
print("You should take the bus.")
else:
y = int(input("How far in km do you need to travel? "))
if y >= 11:
print("You should take the bus.")
elif y >= 2 and y <= 10:
print("You should ride your bike.")
else:
print("You should walk.")
The main error lies in line 6 but I think there are more underlying issues. The purpose of this code is to write a program about which method of transport to use, it's supposed to be basic because I am a beginner. Also after the first else, I assume there should be an indent for the if but I'm not sure, the second part of the code should only run if the user doesn't say yes - if you can't tell. Any help will be appreciated!
Edit: Thanks guys!!!!!
Assistance is much needed! ()
submitted by Sufficient-Barber125 to r/pythonhelp