CodeSolved

Solved Programming Questions & Exercises

The age of the father and the son

Practice Easy 55/ Download 2304 Views

Write a program that receives the age of father and son from the input and prints them (subtraction) in the output

53 Answers

pedar=int(input("sen pedar:"))
pesar=int(input("sen pesar:"))
a=pedar-pesar
print(a)

F.sarli Download Python New
This answer is only visible to premium members
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

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
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

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
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

This answer is only visible to premium members

Subscription is currently unavailable.
# Get user input for father's age and son's age
a = int(input("Enter the father's age: "))  # Corrected the typo in the prompt
b = int(input("Enter the son's age: "))     # Prompt for son's age
# Calculate the age difference
d = a - b
# Print the result
print("Here is your result: ", d)
Dani.nejad Download Python
X=int(input("father's age: "))
Y=int(input("boy's age: "))
print(X-Y)
Farbod.313 Download Python
dadage = int(input("a: "))
sonage = int(input("b: "))
print(dadage-sonage)
Akams Download Python
tool = int(input("tool"))
arz = int(input("arz"))
print(tool * arz)
User 1437 Download Python
fatherAge=int(input("please set father age: "))
sonAge=int(input("please set son age: "))
print("minus =",fatherAge-sonAge)
Saeeda33 Download Python
a =int(input("sen pedar:"))
b = int(input("sen pesar:"))
tafazol = (a - b)
print("tafazol,sen=" ,tafazol)
User 1191 Download Python
<< Previous page 1 2 6 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close