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
jek_recluse [69]
3 years ago
14

Write a loop to populate user_guesses with num_guesses integers. read integers using int(input()). ex: if num_guesses is 3 and u

ser enters 9 5 2, then user_guesses is [9, 5, 2].
Computers and Technology
2 answers:
kodGreya [7K]3 years ago
7 0

Answer:

num_guesses = 3  #initialized number of guesses to 3

user_guesses = []  #declared the user_guesses array

guess = 0  #guess variable initialized to 0

print('Enter a number: ')  #prompt telling the user to enter a number

while guess < num_guesses:  #loop capturing input and storing into array

   num = int(input())

   user_guesses.append(num)

   guess = guess + 1

#end of loop

print(user_guesses) #array outputted to user

Explanation:

The above program captures numbers from the user and stores into an array (user_guesses), the length of the array is determined by the value contained in the num_guesses variable, it prints the combined input as an array.

Kruka [31]3 years ago
5 0

Answer:

num_guesses = int(input()) //

user_guesses = [] //

guess = 0 //

while guess < num_guesses:  

  num = int(input())

  user_guesses.append(num)

  guess = guess + 1

print('user_guesses:', user_guesses)

Explanation:

num_guesses = int(input()) #int input

user_guesses = [] // #empty string

guess = 0 // #guess startign at zero

while guess < num_guesses:  #loop

  num = int(input())

  user_guesses.append(num)

  guess = guess + 1

print('user_guesses:', user_guesses)

You might be interested in
Which of the following is not a use of a hash function
soldi70 [24.7K]

Answer:

the answer would be there

Explanation:

7 0
3 years ago
Which of these files, when included in a program, will provide user assistance?
34kurt

Answer:

Answer for this question is D

Explanation:

Help flies

4 0
3 years ago
Read 2 more answers
Find 5 rational numbers between -1 and 1​
Alisiya [41]
1. = 0
2. =-0.5
3.=-0.75
4.=-0.875
5.=-0.9375
4 0
4 years ago
ONLY ANSWER IF YOU KNOW HOW TO WRITE THIS CODE
denis-greek [22]

Answer:

WRITE THIS CODE

WRITE

WRITE

8 0
3 years ago
Read 2 more answers
Can any software run on any processor
jekas [21]

Answer:

Yes.

Explanation:

Your software requires CPU instruction if CPU doesn't provide that instructions the software won't work/run.

hope this helps you

have a great day:)

6 0
3 years ago
Other questions:
  • Which modem settings should be configured on DSL or cable modems?
    14·1 answer
  • ________ is an open-source program supported by the Apache Foundation that manages thousands of computers and implements MapRedu
    5·1 answer
  • You type the word "weather" when you meant to type "whether". When will Microsoft Writer or Microsoft Word flag this as a misspe
    11·2 answers
  • Your environment includes many users who print documents often. A single print device isn't sufficient. You need a "printer pool
    7·1 answer
  • To add a row labeled "total" to a query design click the ____ button in the show/hide group on the design tab on the ribbon.
    14·2 answers
  • is the process of creating a message to be communicated. a. Encoding b. Decoding c. Receiving d. Sending
    10·2 answers
  • Beverly is creating a website for her new clothing company. Aside from including photographs, how can she use the index page to
    8·2 answers
  • 1.Menciona tres factores o variables que consideras influirán en el oscurecimiento del alimento cortado o pelado expuesto a la i
    8·1 answer
  • This isn't academic, but what do I do if HI-REZ won't let me sign into an existing account. “Something went wrong” keeps popping
    5·1 answer
  • If the bookstore sold 8 books for $66 at that rate how much was one book
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!