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
hram777 [196]
2 years ago
6

4.5 Code Practice

Computers and Technology
1 answer:
dmitriy555 [2]2 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
Which website allows you to host your podcast for at a cost that includes your domain name?
scZoUnD [109]

Answer: WordPress

Explanation:It is a kind of website where you can publish your content on any thing and can also buy domain there,if wanted

8 0
3 years ago
Read 2 more answers
Direction: Write True on the line if the statement is correct. Write False if the statement is incorrect. 1. All objects are com
jeyben [28]
<h2><u>ANSWER</u><u>:</u></h2>

  1. <u>TRUE</u>
  2. <u>FALSE</u>
  3. <u>FALSE</u>
  4. <u>TRUE</u>
  5. <u>TRUE</u>
<h2><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u><u>_</u></h2>

<u>CARRY</u><u> </u><u>ON</u><u> LEARNING</u>

<u>CAN</u><u> </u><u>YOU</u><u> BRAINLEST</u><u> ME</u><u> PLEASE</u>

6 0
2 years ago
Read 2 more answers
What can macro mode on a camera be used for?
AleksandrR [38]

Answer:

taking photos of small things or a close up.

Explanation:

great for taking photos of bugs or flowers, it's very helpful

6 0
2 years ago
Read 2 more answers
What does the following statement do? vector v(10, 2);
Alecsey [184]

Answer:

D) It creates a vector object with a starting size of 10 and all elements are initialized with the value 2.

Explanation:

When you write the statement vector<int> v(10,2); This statement declares a vector or dynamic array of size 10 that is the first parameter and the second parameter is the value with which all the elements in the vector are to be initialized.So in this vector all the 10 values will be initialized with the value 2.It is one of the way of initializing the vector.

3 0
2 years ago
An important task that the operating system performs is ____, which keeps track of the files stored on a computer so that they c
finlep [7]
#1) An important task that the operating system performs is ____, which keeps track of the files stored on a computer so that they can be retrieved when needed.
Answer: File Management System. Keeps track of where files are stored and determines how the files are stored following the operating system file allocation policies. It uses available storage space efficiently for files and creates a record/log of all file usage. It allocates a file to a user if is free, and if they are permitted access to it. Then de-allocates file when the user is finished with it.
8 0
3 years ago
Other questions:
  • How do i start makeing a Character in the Unreal Game Engine
    14·2 answers
  • Which type of network cover a large geographical area and usually consists of several smaller networks, which might use differen
    5·1 answer
  • Computers store temporary Internet files in the Recycle Bin. These files take up space and slow down a computer. Which tool can
    10·1 answer
  • This is not based on homework but I have a question. I am currently using a gtx 960 with a 6 core amd processor. Does anyone kno
    6·1 answer
  • Which of the following statements is false? a. InputStream and OutputStream are abstract classes for performing byte-based I/O.
    7·1 answer
  • Look at the following program and answer the question that follows it. 1 // This program displays my gross wages. 2 // I worked
    8·1 answer
  • What is a task that is not associated with loading existing data into a new ERP system.
    11·2 answers
  • Create a method called letterGrade that will pass the student's average grade as a parameter and return a letter grade (char). O
    12·1 answer
  • Discuss the advantages and disadvantages of supporting links to files that cross mount points (that is, the file link refers to
    6·1 answer
  • What does a companys code of ethics cover
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!