Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1.  
  2. West = ('AK', 'AZ', 'AR', 'CA', 'CO', 'HI', 'ID', 'IA', 'KS', 'LA', 'MN', 'MO', 'MT', 'NE', 'NV', 'NM', 'ND', 'OK', 'OR',
  3. 'SD', 'TX', 'UT', 'WA', 'WY')
  4.  
  5. East = ('AL', 'CT', 'DE', 'FL', 'GA', 'IL', 'IN', 'KY', 'ME', 'MD', 'MA', 'MI', 'MS', 'NH', 'NJ', 'NY', 'NC', 'OH',
  6. 'PA', 'RI', 'SC', 'TN', 'VT', 'VA', 'WV', 'WI')
  7.  
  8. timezones = {"AK": "(Alaska Daylight Time)", "AZ": "(Mountain)", "AR": "(Central)", "CA": "(Pacific)", "CO": "(Mountain)",
  9. "HI": "(Hawaii-Aleutian GMT-10)", "ID": "(Mountain or Pacific, google the city)", "IA": "(Central)",
  10. "KS": "(Majority Central, some Mountain, google the city)",
  11. "LA": "(Central)", "MN": "(Central)", "MO": "(Central)", "MT": "(Mountain)",
  12. "NE": "(Majority Central, some Mountain, google the city)",
  13. "NV": "(Pacific)", "NM": "(Mountain)", "ND": "Majority Central, some Mountain, google the city",
  14. "OK": "(Central)",
  15. "OR": "(Majority Pacific, some Mountain - google the city)",
  16. "SD": "(Central(east)Mountain(west))",
  17. "TX": "(Majority Central, some Mountain (El Paso etc), google the city)",
  18. "UT": "(Mountain)", "WA": "(Pacific)",
  19. "WY": "(Mountain)", "AL": "(Central)", "CT": "(Eastern)", "DE": "(Eastern)",
  20. "FL": "(Eastern and Central, google the city)",
  21. "GA": "(Eastern)", "IL": "(Central)", "IN": "(Eastern and Central)",
  22. "KY": "(Eastern and Central, google the city)", "ME": "(Eastern)",
  23. "MD": "(Eastern)", "MA": "(Eastern)", "MI": "(Eastern and Central, google the city)",
  24. "MS": "(Central)", "NH": "(Eastern)",
  25. "NJ": "(Eastern)", "NY": "(Eastern)", "NC": "(Eastern)", "OH": "(Eastern)", "PA": "(Eastern)",
  26. "RI": "(Eastern)", "SC": "(Eastern)", "TN": "(Central and Eastern, google the city)",
  27. "VT": "(Eastern)", "VA": "(Eastern)",
  28. "WV": "(Eastern)", "WI": "(Central)"}
  29.  
  30. multiple_timezone_states = ('ID', 'OR', 'KS', 'NE', 'ND', 'SD', 'TX', 'FL', 'IN', 'KY', 'MI', 'TN', 'AK')
  31.  
  32.  
  33. def main():
  34.  
  35. question = input("\nEnter State: ").upper()
  36.  
  37. if question in East and multiple_timezone_states:
  38. print("\nEast: Hudson")
  39. state_reenter()
  40. elif question in East and not multiple_timezone_states:
  41. print("\nTimezone: " + timezones[question])
  42. elif question in West and multiple_timezone_states:
  43. print("\nWest: Rochelle")
  44. state_reenter()
  45. elif question in West and not multiple_timezone_states:
  46. print("\nTimezone: " + timezones[question])
  47. else:
  48. print("\nCannot find state, check entry and try again")
  49.  
  50.  
  51. print("Please put abbreviations in UPPERCASE for example - AK or AZ etc ")
  52. loop = 0
  53. while True:
  54. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement