Calculate the year of 100 years
Write a program that gets the user's age and calculates what year the user (solar and AD) is 100 years old.
Write a program that gets the user's age and calculates what year the user (solar and AD) is 100 years old.
# Getting age = int(input("age :")) sh = int(input("sall shamsi :")) me = int(input("sall meladi :")) # Calculate and print on the output age = 100 - age sh += age me += age print("shamsi {} , meladi {}".format(sh,me))
age = int(input("please enter your age: ")) print(f"shoma dar sale {2024 + age} miladi va sale {1402 + age} shamsi , sad sale mi shavid.")
# Calculations def im_100_years_old(age, now): x = 100 - age y = now + x print('You will be a hundred years old in :') print(y) # Variables age = int(input('how old are you ? : ')) now = int(input('what is this years? :')) # Implementation of the program im_100_years_old(age, now)
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)}"')
x = int(input("enter age :")) x -= 100 x = abs(x) y = x + 2024 print("you will be 100 years old at",y)
year = int(input('enter your birthyear : ')) month = input('enter your birthmonth : ') day = input('enter your birthday : ') print(year + 100 , month , day)
x = int(input('age:')) y = 100 a = int(input('what is this years ?:')) print('one hundred years old in:',y-x+a)
a=int(input("age:")) b=int(input("yers sham:")) c=int(input("yers mila:")) d=100-a print(b+d,c+d)
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.")
from datetime import datetime import jdatetime age = int(input("Please enter your age: ")) current_ad_year = datetime.now().year current_shamsi_year = jdatetime.date.today().year print(f"AD year your age = 100 => {current_ad_year + (100 - age)}") print(f"shamsi Year your age = 100 => {current_shamsi_year + (100 - age)}")
Submitting answers is currently unavailable.
Write a function that receives a string and return the encrypted value according to the algorithm below. Then write a function that receives the encryption phrase and returns the initial string. In this encryption: Everything must be with ...
Write a program that receives a number and from that number to 0 countdown is required between each number of 1 second pauses
Write a program that receives an infinite number from the user and when the user entered the number 0; Print all numbers entered from large to small in the output
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.