From b5b5c0d0a4eb7d708441731a750fe6c0968170fd Mon Sep 17 00:00:00 2001 From: yujiitadori0 <116101030+yujiitadori0@users.noreply.github.com> Date: Fri, 21 Oct 2022 16:52:31 +0530 Subject: [PATCH] Create p1.py --- p1.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 p1.py diff --git a/p1.py b/p1.py new file mode 100644 index 0000000..a7f3cd6 --- /dev/null +++ b/p1.py @@ -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}.')