answer.
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
Vikentia
2 months ago
13

Write a loop to populate the list user_guesses with a number of guesses. The variable num_guesses is the number of guesses the u

ser will have, which is read first as an integer. Read integers one at a time using int(input()). Sample output with input: '3 9 5 2' user_guesses: [9, 5, 2]
Computers and Technology
1 answer:
oksian1 [950]2 months ago
6 0

Response:

num_guesses = int(input())

user_guesses = []

for i in range(num_guesses):

    x = int(input())

    user_guesses.append(x)

   

print(user_guesses)

Clarification:

This solution is given in Python

The initial line requests the user to input a number of guesses

num_guesses = int(input())

This line establishes an empty list

user_guesses = []

Inside this loop, each guess is taken from the user

for i in range(num_guesses):

In this line, each guess input by the user is processed

    x = int(input())

This adds the input to the list

    user_guesses.append(x)

Finally, this prints the collected user guesses    

print(user_guesses)

You might be interested in
What type of operating system runs a dedicated electronic device such as a smart thermostat?
Natasha_Volkova [1026]

Answer:

Typically, these operate on IOS or Android platforms. (Similar to what smartphones use. However, it’s often a simplified or modified version.)

Explanation:

Numerous small electronic gadgets, including the one mentioned, function using IOS or Android operating systems. Generally, it serves basic purposes yet is compact, quick, and user-friendly.

5 0
3 months ago
Life changing technology is easy to fall in love with. Describe a feature of a product that did it for you and highlight its ben
Amiraneli [1052]

An example of transformative technology that significantly affected my life is Artificial Intelligence.

Whether through Google Assistant, Amazon Alexa, or an AI-powered online medical consultant, this technology offers dependable and valuable assistance.

It helps manage daily reminders amidst a busy schedule or provides medical advice for a sick family member without needing a hospital visit, and often offers useful suggestions.

This technology has altered our lives in various ways, including my own.

5 0
3 months ago
Write the state of the elements of each of the following arrays after each pass of the outermost loop of the selection sort algo
Natasha_Volkova [1026]

Answer:

Below is the explanation provided.

Elaboration:

In the first array => 8, 5, -9, 14, 0, -1, -7, 3.

  • 8, 5, -9, 14, 0, -1, -7, 3 For the first iteration, find the smallest from the first to the eighth and reposition the third element in the first place.
  • -9, 8, 5, 14, 0, -1, -7, 3 In the second round, identify the smallest from the second to eighth and adjust the penultimate element in the second slot.
  • -9, -7, 8, 5, 14, 0, -1, 3 For the third pass, find the least from third to eighth and move the second last item from that segment.
  • -9, -7, -1, 8, 5, 14, 0, 3 For the fourth pass, find the minimum from the fourth to eighth and shift the last second item from that section.
  • -9, -7, -1, 0, 8, 5, 14, 3 For the fifth pass, seek for the smallest from the fifth to eighth and place the last element from that portion.
  • -9, -7, -1, 0, 3, 8, 5, 14 For the sixth pass, identify the smallest from the sixth to eighth and shift the last second element from that group.
  • -9, -7, -1, 0, 3, 5, 8, 14 are in order now.

In the second array => 15, 56, 24, 5, 39, -4, 27, 10.

  • 15, 56, 24, 5, 39, -4, 27, 10 In the first iteration, identify the smallest item from the first to the eighth and reposition the last third item in that section.
  • -4, 15, 56, 24, 5, 39, 27, 10 In the second round, find the minimum item from second to eighth and interchange the last fourth item in that segment.
  • -4, 5, 15, 56, 24, 39, 27, 10 For the third pass, select the smallest from the third to eighth and shift the last item from that set.
  • -4, 5, 10, 15, 56, 24, 39, 27 For the fourth stage, determine the smallest from the fourth to eighth and do not shift its position as it is already sorted.
  • -4, 5, 10, 15, 56, 24, 39, 27 For the fifth iteration, check for the smallest from the fifth to the eighth and intersperse the last third item from that section.
  • -4, 5, 10, 15, 24, 56, 39, 27 For the sixth phase, find the smallest from the sixth to the eighth and exchange the last item in the sixth.
  • -4, 5, 10, 15, 24, 27, 56, 39 are in order now.
4 0
1 month ago
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year
maria [1035]

What is the anticipated overall expense for one year at the local community college should Kirk reside at home?

Answer: $6845



What is the estimated total cost for one year at the out-of-state institution if Kirk resides on campus?

Answer: $30,566

5 0
2 months ago
Read 2 more answers
A network administrator has received the IPv6 prefix 2001:DB8::/48 for subnetting. Assuming the administrator does not subnet in
8_murik_8 [964]

Answer:

subnets=65536

Explanation:

As per our knowledge,

--> the address's interface ID portion begins at 64

--> there exists a 48 bit network prefix

therefore,

the bits available for subnets are = 64-48=  16

thus, by utilizing 16 bits, the number of subnets can be calculated as = 2^16 = 65535

6 0
2 months ago
Other questions:
  • In what areas is Leslie's underspending hurting her budget select all that apply
    5·1 answer
  • To reduce costs and the environmental impact of commuting, your company decides to close a number of offices and to provide supp
    14·1 answer
  • In the middle of the iteration, how should a team handle requirement changes from the customer? (1 correct answer)
    7·2 answers
  • A retailer is able to track which products draw the most attention from its customers through the use of 5g-enabled motion senso
    5·1 answer
  • The president of the company wants a list of all orders ever taken. He wants to see the customer name, the last name of the empl
    15·1 answer
  • Exercise 8.1.9: Diving Contest Your school is hosting a diving contest, and they need a programmer to work on the scoreboard! Yo
    7·1 answer
  • _______________ is used by a hacker to mask intrusion and obtain administrator permissions to a computer.
    7·1 answer
  • A bicycle sharing company is developing a multi-tier architecture to track the location of its bicycles during peak operating ho
    11·1 answer
  • Write a complete Java program that: Prompts an employee to enter the number of hours that they have worked in a given week and s
    14·1 answer
  • 5) [4 points] Suppose you have a simple computer that is capable of storing only the months of the year. The number of bits avai
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!