Skip to content

Instantly share code, notes, and snippets.

View MrThiago's full-sized avatar
:octocat:
Flat Data...

Thiago MrThiago

:octocat:
Flat Data...
View GitHub Profile
print("I will tell you how days, weeks and months you have left, if you were to live until 90 years old.\n")
age = int(input("How old are you? \n"))
years_left = 90 - age
days_left = years_left * 365
weeks_left = years_left * 52
months_left = years_left * 12
print(f"You have {days_left} days, {weeks_left} weeks and {months_left} months left.")
@MrThiago
MrThiago / TipCalculator.py
Created December 26, 2020 16:25
Tip and Bill split Calculator
print("Tip and Bill Calculator")
bill = float(input("What is the total bill?\n"))
tip = int(input("What percentage tip would you like to give: 10, 12, 15 or 20?\n"))
people = int(input("How many people to split the bill?\n"))
# Get the percentage
tip_percentage = tip / 100
# The the tip amount