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
Gennadij [26K]
3 years ago
5

Write code that inserts userItems into the output string stream itemsOSS until the user enters "Exit". Each item should be follo

wed by a space. Sample output if user input is "red purple yellow Exit": red purple yellow
Computers and Technology
1 answer:
Yuki888 [10]3 years ago
8 0

Answer:

The solution code is written in Python:

  1. itemsOSS = ""
  2. userItem = input("Enter an item: ")
  3. while(item != "Exit"):
  4.    itemsOSS += userItem + " "
  5.    userItem = input("Enter an item: ")
  6. print(itemsOSS)

Explanation:

Firstly, we create a variable itemsOSS (intialized it with empty string) and use it as output string stream (Line 1).

Next use input function to prompt user to enter first item (Line 2)

While the item value is not "Exit" (Line 4), append userItem to variable itemsOSS.

When the user enter "Exit", use print function to print the itemsOSS string (Line 8).

You might be interested in
_____ is a scam in which access to one's own computer is locked or restricted in some way.
gtnhenbr [62]
Ransomware is the answer to this.
5 0
3 years ago
The processor has a five-stage pipeline F D O E M S; that is, instruction fetch, instruction decode, operand fetch, execute, mem
lawyer [7]

Answer:

a) Internal Forwarding is not used = 26 clock cycles

b)Internal Forwarding is used= 22 clock cycles

5 0
4 years ago
What line of code will import matplotlib in it
Sav [38]

Answer:

import matplotlib

Explanation:

5 0
4 years ago
You already know how to use lists. What is the index of 5 in the following list? [2, 3, 5, 1, 6]
ASHA 777 [7]

Answer:

1

Explanation:

5 0
3 years ago
Read 2 more answers
What is a histogram?
Mice21 [21]

Answer:

I’m pretty sure its C. Can you mark me Brainliest if I am correct? Thank you have a nice day!

Explanation:

8 0
4 years ago
Other questions:
  • A _________ provides multiple ports for connecting nodes and is aware of the exact address or identity of all the nodes attached
    15·2 answers
  • Exchanging which type of data uses the least bandwidth?
    14·1 answer
  • Please Help Me!!! 40 Points!! Match the correct definition to each term
    14·1 answer
  • A _____________ is some text or data that is stored on your computer and used by a website to track how you use that site. quest
    8·2 answers
  • In recent years, the amount of time people spend using electronic devices has sharply increased. What are the benefits and downs
    7·1 answer
  • Which of the following is NOT a safety practice for working near power lines?
    14·1 answer
  • As a project manager, why is analysis an important aspect of the job?
    10·1 answer
  • Ten examples of an interpreter
    8·1 answer
  • 5. Compare the telephone network and the internet. What are the similarities? What are the differences?
    12·1 answer
  • Assume that two students are trying to register for a course in which there is only one open seat. What component of a database
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!