Thursday, 11 September, 2025г.
russian english deutsch french spanish portuguese czech greek georgian chinese japanese korean indonesian turkish thai uzbek

пример: покупка автомобиля в Запорожье

 

How to calculate age using input() in Python

How to calculate age using input() in PythonУ вашего броузера проблема в совместимости с HTML5
import datetime Year = int(input(" Please enter the year you were born ")) Month = int(input(" Please enter the number of the month you were born. For example 3 = March ")) Day = int(input(" Please enter the day you were born ")) DOB = datetime.datetime(Year,Month,Day) Age = (datetime.datetime.now() - DOB) print("You are " + str(Age.days) + " days old") convertdays = int(Age.days) AgeYears = convertdays/365 print("Or " + str(AgeYears) + " years old to be less precise!")
Мой аккаунт