javondailey5193 javondailey5193
  • 09-07-2020
  • Computers and Technology
contestada

Create a for loop that prompts the user to enter 3 different items, then appends them to new items list

Respuesta :

frknkrtrn
frknkrtrn frknkrtrn
  • 11-07-2020

Answer:

new_items = []

for i in range(3):

   item = input("Enter an item: ")

   new_items.append(item)

print(new_items)

Explanation:

*The code is in Python.

Create an empty list called  new_items

Create a for loop that iterates three times. Inside the loop, ask the user to enter an item. Append the item to the new_items using the append method.

When the loop is done, print the new_items

Answer Link

Otras preguntas

What is always true about lines that slant downward from left to the right? Select ALL that apply. The graph of the line has extremely small values. The slope o
Y Temperature 12 11 10 9 8 7 Temperature (°C) 4 3 2 1 7:00 8:00 х 10:00 9:00 Time
3. Find the area of a rectangle that is 2 feet long and 4/5 of a foot wide
Kids Fight Climate Change in Court CENTRAL IDEA
What fraction describes how much more of the trail Jon hiked than Andrea hiked?
- 8x + 9y + 92 = -2 8x + y + 4z = 3 - 8x + 8y + 9z = 7
PLEASE PLEASE HELP i will give brainliest to whoever answers first
What should be asked when deconstructing a political cartoon that was drawn in 1898? A. Who paid for it to be drawn? B. Why was it drawn? C. What is its point o
If researchers allow their moral or other personal beliefs to influence their objectivity, this is most likely an example of:_______ a. A conflict of conscience
A Mayan city political area was called ​