Skip to content

Commit

Permalink
Removed .strip() from inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Thayer committed Mar 23, 2020
1 parent 2f218a1 commit a2febbf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bikeshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,28 @@ def get_filters():

message = '''Invalid option please try again.'''

city = input("Please select a city: Chicago, New York City, or Washington: ").strip().lower()
city = input("Please select a city: Chicago, New York City, or Washington: ").lower()

while city not in options:
print(message)
city = input("Please select a city: Chicago, New York City, or Washington: ").strip().lower()
city = input("Please select a city: Chicago, New York City, or Washington: ").lower()


# TO DO: get user input for month (all, january, february, ... , june)

month = input("Please enter a valid month (January - June) or use 'all' to choose all months: ").strip().lower()
month = input("Please enter a valid month (January - June) or use 'all' to choose all months: ").lower()

while month not in months:
print("Invalid input please try again.")
month = input("Please enter a valid month (January - June) or use 'all' to choose all months: ").strip().lower()
month = input("Please enter a valid month (January - June) or use 'all' to choose all months: ").lower()

# TO DO: get user input for day of week (all, monday, tuesday, ... sunday)

day = input("Please enter a valid day or use 'all' to choose all days in the week: ").strip().lower()
day = input("Please enter a valid day or use 'all' to choose all days in the week: ").lower()

while day not in DOW:
print("Invalid input please try again.")
day = input("Please enter a valid day or use 'all' to choose all days in the week: ").strip().lower()
day = input("Please enter a valid day or use 'all' to choose all days in the week: ").lower()

print('-'*40)
return city, month, day
Expand Down

0 comments on commit a2febbf

Please sign in to comment.