1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dafna11 [192]
3 years ago
8

Grandma Ester normally gives you hugs for your birthday - one for every year old you are. When you turned 15, she squished you w

ith 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."
print("**HUG**")
Computers and Technology
1 answer:
horsena [70]3 years ago
4 0

Answer:

Written in Python

age = int(input("How old are you? "))

for i in range(1,age+1):

     print("**HUG**")

Explanation:

The first line prompts the user for age

age = int(input("How old are you? "))

The next line is an iteration that starts from 1 till the user input

for i in range(1,age+1):

The last line prints "**HUG**" while the iteration is true

     print("**HUG**")

You might be interested in
What is a device that connects to the system unit and is controlled by the processor in the computer called !
Airida [17]
Most computers have three types of ports: serial, parallel, and USB. A serial port is a type of interface that connects a device to the system unit by transmitting data only one bit at a time. Serial ports usually connect devices that do not require fast data transmission rates, such as a mouse, keyboard, or modem.
4 0
3 years ago
20 points<br><br> In what ways is the human brain like a computer? In what ways is it different?
mojhsa [17]

Answer:

Alright imma explain below

Explanation:

It it’s similar because both give info. Also the reaction time on both are fast. They are different in some ways too. A computer runs on electricity but the brain doesn’t. A brain can actually think but a computer can not.

Hope this helps

8 0
3 years ago
Read 2 more answers
Use semaphore(s) to solve the following problem. There are three processes: P1, P2, and P3. Each process Pi has a segment of cod
Lisa [10]

Answer:

See explaination

Explanation:

Here we will use two semaphore variables to satisfy our goal

We will initialize s1=1 and s2=1 globally and they are accessed by all 3 processes and use up and down operations in following way

Code:-

s1,s2=1

P1 P2 P3

P(s1)

P(s2)

C1

V(s2) .

P(s2). .

. C2

V(s1) .

P(s1)

. . C3

V(s2)

Explanation:-

The P(s1) stands for down operation for semaphore s1 and V(s1) stands for Up operation for semaphore s1.

The Down operation on s1=1 will make it s1=0 and our process will execute ,and down on s1=0 will block the process

The Up operation on s1=0 will unblock the process and on s1=1 will be normal execution of process

Now in the above code:

1)If C1 is executed first then it means down on s1,s2 will make it zero and up on s2 will make it 1, so in that case C3 cannot execute because P3 has down operation on s1 before C3 ,so C2 will execute by performing down on s2 and after that Up on s1 will be done by P2 and then C3 can execute

So our first condition gets satisfied

2)If C1 is not executed earlier means:-

a)If C2 is executed by performing down on S2 then s2=0,so definitely C3 will be executed because down(s2) in case of C1 will block the process P1 and after C3 execute Up operation on s2 ,C1 can execute because P1 gets unblocked .

b)If C3 is executed by performing down on s1 then s1=0 ,so definitely C2 will be executed now ,because down on s1 will block the process P1 and after that P2 will perform up on s1 ,so P1 gets unblocked

So C1 will be executed after C2 and C3 ,hence our 2nd condition satisfied.

4 0
3 years ago
Consider the following scenario and prescribe a solution. Situation: Tenisha is moving to Ohio to attend college. It is very hum
xz_007 [3.2K]

Answer:

Unplug the computer during a lightning storm

Explanation:

If there is a lightning storm you should always unplug your laptop or laptop or computer. If the lightning hits your computer you fried it and you can't use it anymore, but, if you unplug it it will save it from getting it fried. Always unplug your your computer during a lightning storm!

Hope it helps! :D

Have a great day! :)

3 0
3 years ago
Its inventiveness uncertainty and futuristic ideas deals with science and technology,what is it?
Sedaia [141]

Answer:

Capital FM

Explanation:

8 0
3 years ago
Other questions:
  • Why do we need the Domain Name System (DNS)? Given the domain name www.flamingflamingos.eu, what is the top level domain in this
    5·1 answer
  • John is analyzing strange behavior on computers in his network. He believes there is malware on the machines. The symptoms inclu
    5·1 answer
  • You are out on the water. you do not understand what another boater intends to do. what sound signal should you make?
    14·1 answer
  • What did Edison's device to view motion pictures inspire the Lumiere brothers to invent?
    14·1 answer
  • If you tap or click the increase font size button too many times and make the font size too big, you can tap or click the _____
    9·1 answer
  • Your task is to write and test a function which takes one argument (a year) and returns True if the year is a leap year, or Fals
    5·1 answer
  • What will the value of x be after the following statements execute? int x = 0; int y = 5; int z = 4; x = y z * 2;
    14·1 answer
  • PLEASEEEEEE HELP, ILL DO ANYTHING JUST ANSWER THESE CORRECTLY!!!!!TYSM!!!
    15·2 answers
  • System. Construct an ER diagram for keeping records for exam section of a college.​
    10·1 answer
  • Select the correct answer from the drop-down menu.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!