Computer Science, asked by 604474, 6 months ago

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 valeriy69
3

\small\mathsf\color{pink}{Solution\: using\: python\: 3}

age = int(input("enter age: "))

hugs = ["Grandma hugs you" for n in range(1, age + 1)]

print("\n".join(hugs))

\small\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by Anonymous
2

Answer:

age = int(input("enter age: "))

hugs = "Grandma hugs you" for n in range(1, age + 1)

Similar questions