menu
Qammunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Write a program that asks the user to enter the persons age program should display whether the user is an infant or adult
Ask a Question
Questions
Unanswered
Tags
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
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
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
4. Which of the following is the first thing you should do when attempting to park? A. Securing the parking spot by standing in it B. Turning on your hazard lights C. Confirming the space can fit your
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
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org