Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions p1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

from datetime import date
name = input("Enter your name: ") # user input
current_age = int(input("Enter your age: ")) # user input
#calculating the 100th year, considering 2020 as the current year
hundredth_year = 2022 + (100 - current_age)
print(f'{name} will become 100 years old in the year {hundredth_year}.')