تفاضل سن پدر و پسر
برنامه ای بنویسید که سن پدر و پسری را از ورودی دریافت کند و تفاضل (تفریق) آنها را در خروجی چاپ کند
👨💻 2 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد
برنامه ای بنویسید که سن پدر و پسری را از ورودی دریافت کند و تفاضل (تفریق) آنها را در خروجی چاپ کند
a = float(input("سن پدر را وارد کنید "))
print(a)
b = float(input("سن پسر را وارد کنید "))
print(b)
c = float(input("اگه پسر دوم هم دارید این جا سنش را وارد کنید اگه ندارید صفر بنویسید "))
print(c)
d = (a-b-c)
print("تفاضل سن پسر و پدر شما هست ")
print(d)
name= int (input("sen pedar="))
name2= int (input("sen pesar="))
print("faseleh sen=" , name - name2)
print ("How much would you be if you subtracted your age from your father's?")
khodet = int(input("sen khodet!:"))
pedaret = int(input("sen pedaret:"))
print ("the result",pedaret - khodet)
a=input("pedar: ")
b=input("pesar: ")
a2=int(a)
b2=int(b)
c=a2-b2
print(c)
father = int(input())
child = int(input())
print(father - child)
F = input("Father's age? ")
B = input("Son's age? ")
F = int(F)
B = int(B)
result = (F - B)
print(result)
x = int(input("enter your father's age:"))
y = int(input("enter your age:"))
a = x - y
print("Result:" , a)
Father = int(input("Vared Con Sen Pedar : "))
Son = int(input("Vared Con Sen Son : "))
Ekhtelaf = (Father - Son)
print (Ekhtelaf)
#_The program for calculating the age difference between father and son
def Age_difference_between_father_and_son() :
father = int (input ("Please Enter The Father's age:"))
son = int(input("Please Enter The Son's age:"))
Age_difference_between_father_and_son = (father - son)
print("Age difference between father and son is:" , Age_difference_between_father_and_son)
Age_difference_between_father_and_son()
a = int(input("enter father's age :"))
b = int(input("enter son's age :"))
print ("d =" , (a-b))
جوابت را با Markdown بنویس و ثبت کن
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نامتوضیح کوتاهی بنویسید تا تیم بررسی کند.