Grandma Ester normally gives you hugs for your birthday - one for every year old you are. When you turned 15, she squished you with 15 hugs! This year, she, unfortunately, cannot see you on your birthday, so instead, she wants to send you virtual hugs! Create a program that prompts the user for how old they are turning and then using a loop, output a virtual hug for every year old they are
Answers
Answered by
3
age = int(input("enter age: "))
hugs = ["Grandma hugs you" for n in range(1, age + 1)]
print("\n".join(hugs))
Answered by
2
Answer:
age = int(input("enter age: "))
hugs = "Grandma hugs you" for n in range(1, age + 1)
Similar questions