Advertisement
biswasrohit20

earthquake

Mar 24th, 2021
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. mag = float(input("Please enter the magnitude of the earthquake: "))
  2. if mag < 0:
  3. print("Invalid Input!! Magnitude can not be less than zero")
  4. exit()
  5. if mag < 2:
  6. print("It was a Micro earthquake,")
  7. elif mag < 3:
  8. print("It was a Very minor earthquake,")
  9. elif mag < 4:
  10. print("It was a Minor earthquake,")
  11. elif mag < 5:
  12. print("It was a Light earthquake,")
  13. elif mag < 6:
  14. print("It was a Moderate earthquake,")
  15. elif mag < 7:
  16. print("It was a Strong earthquake,")
  17. elif mag < 8:
  18. print("It was a Major earthquake,")
  19. elif mag < 10:
  20. print("It was a Great earthquake,")
  21. else:
  22. print("It was a Meteoric earthquake,")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement