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
a_sh-v [17]
4 years ago
12

Instructions

Computers and Technology
1 answer:
ivanzaharov [21]4 years ago
7 0

i = 0

while True:

user_input = input("Please enter the next word: ")

if user_input == "STOP":

break

i += 1

print("#{}: You entered {}".format(i,user_input))

print("All done. {} words entered.".format(i))

First we set i equal to zero so that we can keep track of how many words we input.

We set while True so that its a continuous loop until a certain condition is met to break out of the loop.

user_input is set equal to whatever word the user enters.

our if statement tells us to break out of the while loop if the user inputs "STOP"

If the user does not enter STOP i is set equal to itself plus 1. This just means we add one to i for every new word entered.

Then we print whichever word is entered.

After the while loop, we print All done and the quantity of words entered.

You might be interested in
Jason logged into a banking website. A few later, he found that money from his account had been transferred to another account w
NemiM [27]
I think it’s bank fraud or cybercrime idk
8 0
3 years ago
How many bytes are in 1 kilobyte of storage
topjm [15]

Answer:

1000

Explanation I SEARCHED IT Up

5 0
4 years ago
What is the common name of computers connected in a network?
ser-zykov [4K]

Answer:

Nodes

Explanation

All of the computers and printers on the network are called nodes of the network

6 0
3 years ago
The high-latitude climate is _____________ the equator.<br><br> closest to<br> farthest from
BARSIC [14]
I believe it’s farthest from
5 0
3 years ago
Write a function max_magnitude() with two integer input parameters that returns the largest magnitude value. Use the function in
JulsSmile [24]

Answer:

def max_magnitude(user_val1, user_val2):

if abs(user_val1) > abs(user_val2):

return user_val1

else:

return user_val2

if __name__ == '__main__':

n1 = int(input("Enter the first integer number: "))

n2 = int(input("Enter the second integer number: "))

print("The largest magnitude value of", n1, "and", n2, "is", max_magnitude(n1, n2))

Explanation:

5 0
3 years ago
Other questions:
  • Which of the following queries can have a Fully Meets result? Select all that apply. True False [adobe website], English (US) Tr
    7·1 answer
  • What is the drawback of the linear model?
    5·2 answers
  • A line of code that begins with the while needs to end which symbol?<br> # <br> "<br> :<br> .
    10·1 answer
  • How can this be achieved? Universal Containers stores invoices in SAP. Users want to view invoice data onthe related Account rec
    9·1 answer
  • In the movie, Willy Wonka and the Chocolate Factory, Augustus Gloop leans over the chocolate river to get a drink and falls in.
    11·1 answer
  • Given that note, write a program which tells us the major scale starting at that note, using the pattern above. In the main bloc
    6·1 answer
  • Use the _______ command to center worksheets vertically and/or horizontally on a page.
    9·1 answer
  • write a pay-raise program that requests a person's first name, last name, and current annual salary, and then displays the perso
    6·1 answer
  • Betty was sitting at a coffee shop reading her favorite book. She heard an explosion nearby. In a few, she could hear ambulance
    7·2 answers
  • What are the six things you will learn this week on Scratch?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!