Skip to content

Instantly share code, notes, and snippets.

View Tig10's full-sized avatar

Tig10

View GitHub Profile
'''
Take a list, say for example this one:
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
and write a program that prints out all the elements of the list
that are less than 5.
Extras:
'''
Ask the user for a number. Depending on whether the number is even or odd, print
out an appropriate message to the user. Hint: how does an even/odd number react
differently when divided by 2?
Extras:
If the number is a multiple of 4, print out a different message.
Ask the user for two numbers: one number to check (call it num) and
one number to divide by (check). If check divides evenly into num, tell
'''
Create a program that asks the user to enter their name and their age.
Print out the message addressed to them that tells them the year they
will turn 100 years old.
'''
from datetime import datetime
today = datetime.now()