Advertisement
ZEdKasat

Untitled

Apr 1st, 2022
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1.  
  2.  
  3.  
  4. year = int(input("Enter a year to check leap or not: "))
  5.  
  6. if year % 4 == 0:
  7. if year % 100 == 0 and year % 400 != 0:
  8. print("Not a leap year")
  9. else:
  10. print("Leap Year")
  11. else:
  12. print("Not a leap year")
  13.  
  14.  
  15.  
  16. n = 5
  17.  
  18. while n < 10:
  19. print(n)
  20. n += 1 # n = n + 1
  21.  
  22. response = input("What do you want to do?")
  23.  
  24. while response != "exit":
  25. if response == "music":
  26. print("Opening Spotify")
  27.  
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement