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
Computer networks make setting appointments easier by _____.
Sunny_sXe [5.5K]

Probably providing a common calendar

5 0
3 years ago
Read 2 more answers
Which two features could be added to a game using an "if () then" block?
xxTIMURxx [149]

The two features that could be added to a game using an "if () then" block are c. if the player touches a wall, it turns around and moves back 5 and d.

<h3>What does the If Then block mean?</h3>

The If-Then block is understood to be the output certainly considered one among given values, this is because of the fee of a Boolean enter.

Note that the entry fee could be very essential and as such, The functions will be introduced to a sport the use of an "if () then " block are: Using nested If-Then blocks. • Checks the particular Bid amount for the instrument.

Learn greater approximately game from :

brainly.com/question/1786465

#SPJ1

3 0
1 year ago
which of the following elements should be included within a screenplay (select all that apply) anwser choices provided in the pi
ale4655 [162]

Answer:

dialogue

Explanation:

3 0
3 years ago
Which best describes a VPN?
aleksandr82 [10.1K]

A private connection through a private network

8 0
2 years ago
Read 2 more answers
A light rag is striking the surface of earth. Which factor would make the light ray more likely to be absorbed than reflected?
Sergeu [11.5K]

Answer:

The answer is D.

Explanation:

because the other answers doesn't make sense.

6 0
3 years ago
Other questions:
  • Samantha was calculating a mathematical formula on an electronic spreadsheet. She used multiple values to recalculate the formul
    12·2 answers
  • Students can use eNotes to type notes directly on screen and
    11·2 answers
  • "What Search Network text ad component provides up to three fields of 30 characters each?"
    6·1 answer
  • Which type of account is typically the MOST liquid?
    15·1 answer
  • A picture of kitchen sink draining system​
    15·2 answers
  • 16 to 19 year old drivers are how many more times likely to crash? 1.7,2.7,0.7 ,3.7
    12·2 answers
  • Betty set up an account on a popular social networking website. she wants to know whether the privacy policy is effective for he
    14·1 answer
  • 2. Select the things you can do when working with rows in columns in a spreadsheet:
    5·1 answer
  • List four tasks that humans perform frequently, but which may be difficult for a computerized agent to accomplish. Describe the
    9·1 answer
  • Help me please, I'm attempting a test<br>​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!