Calculate User Birthday
Write a program that gets the user's age from the input and calculates and prints the user's birthday
Write a program that gets the user's age from the input and calculates and prints the user's birthday
let msg = 'error' alert(msg)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
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
age=int(input('age:')) a=1403 b=age-a print('sale tavalode shoma:',b)
from datetime import date age = int(input(f"What's your age?")) today = date.today() current_year=today.year birth_year=current_year-age print(birth_year)
a=int(input("age: ")) b=int(input("emsal: ")) c=b-a print(c)
from datetime import datetime age = int(input("how old are you?")) current_year = datetime.now().year birth_year = current_year - age print(f"you were born at {birth_year}")
from datetime import datetime as gdt from jdatetime import datetime as jdt age = int(input('Enter your age: ')) print(f'Gregorian birthday: {gdt.today().year - age:2d} - Jalali birthday: {jdt.today().year - age:2d}')
from datetime import datetime # Get User Age from Input age = int(input("لطفاً سن خود را وارد کنید: ")) # Calculate the year of birth current_year = datetime.now().year birth_year = current_year - age # Birthday printing print("سال تولد شما برابر است با:", birth_year)
from datetime import datetime v= eval(input("pless inter you birthday day:")) m= eval(input("pless inter you birthday mons:")) y= eval(input("pless inter you birthday year:")) d = datetime.now() D, M, Y = d.day, d.month, d.year newday = D-v if newday <0 : newday = -newday newmons = M-m if newmons < 0 : newmons = -newmons print(f"{Y-y} year and {newmons} mons {newday} day")
Submitting answers is currently unavailable.
Using JavaScript, send a request with the following specifications method = posturl = /test.php FNAME information =? Lname =? Age =? Get the information above through Prompt from the user
Write a class called Tarikh to receive a solar date in yyyy/mm/dd format and has methods to add and reduce (day, month and year) of date. Also have a method for printing the date on the output. ...
Write a function that receives a numeric and if that number was the first number True and otherwise False returned
We want to open the cow door, we don't know the password, but we have the following information: the second -digit safing password and the fifth digit equivalent to the first number of the first digit of a larger unit ...
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام 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.