menu
Qammunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
write a program that asks the user to enter the persons age program should display whether the user is an infant or adult
asked
Feb 8, 2024
221k
views
5
votes
write a program that asks the user to enter the persons age program should display whether the user is an infant or adult
Engineering
college
BStruthers
asked
by
BStruthers
7.9k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
3
votes
# Get user input for age
age = int(input("Enter the person's age: "))
# Check if the person is an infant or an adult
if age < 1:
print("The person is an infant.")
elif age >= 1:
print("The person is an adult.")
else:
print("Invalid age input.")
Janjonas
answered
Feb 14, 2024
by
Janjonas
8.6k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
No related questions found
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Other Questions
A piston-cylinder device fitted with stops in the cylinder walls contains 2.1 kg of water initially at 150 kPa and 30 °C. Heat is transferred to the system until the final temperature reaches 250 °C. The
A water towers lowest point is 405 ft and the main line is 6 feet below the ground. The ground elevation is at 276 ft. The main line travels 2.9 miles. The pipe will travel through the following flanged
Vitrification is a process of: a. Chemical reaction bonding of aggregate ceramic powder b. Cementing aggregate ceramic powder with a liquefied material c. Solid-state diffusion of aggregate ceramic powder
A face milling operation is to be performed on cast iron. Tool diameter is 5 inches, w = 2 inches, part length = 8 inches, depth of cut = 0.012 inches, f = 0.001 inch/tooth, and N = 250 RPM. Find: MRR,
A three-point bending test was performed on an aluminum oxide specimen having a circular cross section of radius 3.5 mm (0.14 in.); the specimen fractured at a load of 950 N (215 lbf) when the distance
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org