Advertisement
Shell_Casing

Python newbie problem

Aug 23rd, 2017
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. cars = {'honda': 'civic-si', 'mazda': 'mazda3', 'ford': 'focus'}
  2.  
  3. print("Enter an oem-name: (blank to quit)" )
  4.  
  5. oem_name = input()
  6. if oem_name == '':
  7. break
  8.  
  9. if oem_name in cars:
  10. print("That is the " + cars(oem_name))
  11. else:
  12. print("We don't have that oem-name. Try again.")
  13.  
  14.  
  15. THE ERROR I'M GETTING IS:
  16. line 7
  17. break
  18. ^
  19. SyntaxError: 'break' outside loop
  20.  
  21. Process finished with exit code 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement