CodeSolved

Solved Programming Questions & Exercises

Calculate the year of 100 years

Practice Easy 1015/ Download 951 Views

Write a program that gets the user's age and calculates what year the user (solar and AD) is 100 years old.

11 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
import time
current_year = int(time.ctime()[20:]) - 621
age = int(input("Enter your age: "))
print(f'The year when you will be 100: "{current_year+(100-age)}"')
User 362 Download Python
x = int(input("enter age :"))
x -= 100
x = abs(x)
y = x + 2024 
print("you will be 100 years old at",y)
Ali.r.h.z Download Python
year =  int(input('enter your birthyear : '))
month = input('enter your birthmonth : ')
day = input('enter your birthday : ')
print(year + 100 , month , day)
Zahra1392 Download Python
x = int(input('age:'))
y = 100
a = int(input('what is this years ?:'))
print('one hundred years old in:',y-x+a)
User 1705 Download Python
a=int(input("age:"))
b=int(input("yers sham:"))
c=int(input("yers mila:"))
d=100-a
print(b+d,c+d)
def sal (a) :
 u = a  - 100
 u *= -1
 u += 2024
 y = a - 100
 y *= -1
 y += 1404 
 return u , y
age = int (input ('age : '))
r = sal (age)
print (r)

age=int(input("enter your age:"))
n=100-age
result=n+2024
result_2=n+1403
print(f"you will be 100 years old at {result} AD and {result_2} of solar year.")
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close