تفاضل سن پدر و پسر
برنامه ای بنویسید که سن پدر و پسری را از ورودی دریافت کند و تفاضل (تفریق) آنها را در خروجی چاپ کند
👨💻 1 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد
برنامه ای بنویسید که سن پدر و پسری را از ورودی دریافت کند و تفاضل (تفریق) آنها را در خروجی چاپ کند
father's age=input(Enter father's age) boy's age=input(Enter boy's age) print(father's age*boy's age)
#عملیات بدست اوردن تفاضل بین سن پدر و شما
#سن پدر پرسیده میشود
fader =int (input('enter youer fader age; '))
#سن شما پرسیده می شود
you = int (input('enter youer you age; '))
#تفاضل سن پدر و شما
print (fader - you)
#تمرین سایت کدبزن
#2 - تفاضل سن پدر و پسر
#گرفتن سن پدر از کاربر
af = int(input("enter the age of father:"))
#گرفتن سن پسر از کاربر
bs = int(input("enter the age of son:"))
#بدست آوردن اختلاف سن پدر و پسر
print ( af - bs )
print("welcome to here")
A = int(input("sen bozorg ra ersal kon : "))
B = int(input("sen koochak ra ersal kon: "))
c = A-B
print("alan migam")
print(c)
father_Age = int(input("Enter Father Age: "))
child_Age = int(input("Enter Child Age: "))
print("Age difference =", father_Age - child_Age)
def get_age(father_age, son_age):
fa_bo_age = father_age - son_age
if father_age < son_age:
print("The father's age cannot be less than the son's age, so please enter the correct information!!")
get_age(father_age=int(input("Please enter the father age: ")),son_age=int(input("Please enter the son age: ")))
else:
print(f"The result of the age difference between father {father_age} and son {son_age}, {fa_bo_age} is years.")
get_age(father_age=int(input("Please enter the father age: ")), son_age=int(input("Please enter the son age: ")))
a =int(input('age father:'))
f =int(input('age son'))
print(f -a)
#دریافت ورودی
X = int(input("Sen Pedar Ro Vared Kon:"))
Y = int(input("Sen Pesar Ro Vared Kon:"))
#محاسبه تفاضل
Z = X-Y
#خروجی
print(Z)
fatherAge=int(input("سن پدر را وارد کنيد:"))
sonAge=int(input("سن پسر را وارد کنيد:"))
differenceBetweenSonAndFather=fatherAge-sonAge
print("اختلاف سن پدر و پسر:",differenceBetweenSonAndFather)
age_father = float(input('agefather :'))
age_boy = float(input('ageboy :'))
resolut = age_father - age_boy
print(resolut)
جوابت را با Markdown بنویس و ثبت کن
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نامتوضیح کوتاهی بنویسید تا تیم بررسی کند.