Edhesive 4.3 code practice question 1 PLZ SOMEONE
topic: 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.

The following prints a single “virtual hug.”

Respuesta :

fnej

Answer:

x = int(input("How old are you turning? "))

c = 0

while (c != x):

c = c + 1

print("**HUG**")

Following are the python program to calculate the virtual hugs:

Python Program:

age = int(input("How old are you? "))#defining the age variable that inputs age value in number

for x in range(0,age):#defining the loop that counts and prints the number of HUG value

   print("**HUG**")#print message

Output:

please find the attached file.

Program Explanation:

  • Defining the 'age' variable that inputs age value by using the input and int method that takes only numeric value.
  • After the input value, a for loop is defined this loop that counts the age value and prints the number of 'HUG' values, by using the print method.

Learn more on python programs here:

brainly.com/question/17796174

Ver imagen codiepienagoya