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
C
Paraphin [41]
The answer is Document Inspector
5 0
3 years ago
What is the function of HTML?
Anastaziya [24]

Explanation:

HTML is used to create web pages, documents.

hope this helps u

4 0
3 years ago
Read 2 more answers
In a five-choice multiple-choice test, which letter is most often the correct
tatiyna

I believe the answer is C.

5 0
3 years ago
Read 2 more answers
Find the area of square whose perimeter is 260.8m​
inessss [21]
4251.04

The perimeter (260.8) over 4 is equal to each side length (65.2)

65.2^2 = 4251.04
5 0
3 years ago
Need help plz 100 POINTS
steposvetlana [31]

Answer:

salamat sa points wreker

7 0
3 years ago
Read 2 more answers
Other questions:
  • Which statement describes the word "iterative"?
    7·2 answers
  • How can development in ICT be utilized to speed up the development and integration efforts
    15·1 answer
  • It can be useful to have a mentor because they will help you
    7·2 answers
  • What would happen if a pc that contains a power supply that does not automatically adjust for input voltage is set to 230 volts
    13·1 answer
  • Recursion is a natural use for a _____ (stack or queue)
    13·1 answer
  • Tweaking existing technology in a new way is usually called _____. leveraged creativity state-of-the-art breakthrough applicatio
    5·1 answer
  • Project manager Erica is discussing with her team to prepare a document to describe the deliverables and goals of a software pro
    13·1 answer
  • Assume the user responds with a 3 for the first number and a 5 for the second number.
    13·1 answer
  • The data _____ component of a database management system (DBMS) is used to create and maintain the data dictionary.
    12·1 answer
  • You have received an update package for a critical application you are running on a virtual machine. You have been told to insta
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!