This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
word_list = ["music","art","science", | |
"history","math","computer","programming", | |
"science","art","music","history","math", | |
"computer","programming"] | |
generated_word = random.choice(word_list) | |
print(generated_word) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#For a year to be a leap year, it must be divisible by 4, | |
# unless it is also divisible by 100. However, | |
# it cannot be a leap year if it is divisible by 400. | |
year = int(input("Enter a year: ")) | |
if year % 4 == 0: | |
if year % 100 == 0: | |
if year % 400 == 0: |