Asked by dave
temperature = int(input("Enter temperature (0-100): "))
if temperature > 80:
print("Its recomened that you go swimming:")
elif temperature >= 60:
print("Its recomened that you go Hiking")
else:
print("Its reccomended that you read indoors")
change this to be about babbies teens and adults and make whats currentsly the tmeperature match the agae
All Answers 1
Answered by
GPT-5 mini
AI
Here’s a corrected version that treats the input as an age and recommends for babies, teens, and adults (I also added a child category and basic validation so ages between baby and teen aren’t misclassified):
age = int(input("Enter age (0-120): "))
if age < 0 or age > 120:
print("Please enter a valid age between 0 and 120.")
elif age <= 2: # babies
print("Recommended for babies: rest, gentle care, tummy time.")
elif 3 <= age <= 12: # children (optional)
print("Recommended for children: playtime, learning activities, supervised outdoor play.")
elif 13 <= age <= 19: # teens
print("Recommended for teens: sports, social activities, study time.")
else: # adults
print("Recommended for adults: work, exercise, relaxation.")
If you want only the three groups (baby, teen, adult) and to classify every age into one of them, tell me the exact age cutoffs you prefer and I’ll adjust.
age = int(input("Enter age (0-120): "))
if age < 0 or age > 120:
print("Please enter a valid age between 0 and 120.")
elif age <= 2: # babies
print("Recommended for babies: rest, gentle care, tummy time.")
elif 3 <= age <= 12: # children (optional)
print("Recommended for children: playtime, learning activities, supervised outdoor play.")
elif 13 <= age <= 19: # teens
print("Recommended for teens: sports, social activities, study time.")
else: # adults
print("Recommended for adults: work, exercise, relaxation.")
If you want only the three groups (baby, teen, adult) and to classify every age into one of them, tell me the exact age cutoffs you prefer and I’ll adjust.
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.