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
18 days 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 [797]18 days 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
In cell F15, insert a function that will automatically display the word Discontinue if the value in cell D15 is less than 1500,
ivann1987 [930]

Answer:

=IF(D15<1500, "Discontinue", "No Change")

Explanation:

In an Excel environment, you should navigate to cell F15 and apply the IF function. The structure of the IF function is

IF(<condition>, <value if true>, <value if false>)

Your condition is placed before the first comma, which is D15 < 1500.

The second segment, located before the second comma, is the text to display when D15 is below 1500, which is "Discontinue".

Finally, the last part should show text if D15 is 1500 or higher, which is "No Change".

The complete formula can be expressed as =IF(D15<1500, "Discontinue", "No Change")

3 0
1 month ago
Leah Jones is the IT manager at Rock Solid Outfitters, a medium-sized supplier of outdoor climbing and camping gear. Steve Allen
Natasha_Volkova [897]

Answer:

Step 1: Create a table reflecting the three potential scenarios and two possible outcomes. There should be a total of 8 distinct rules for the three varying conditions, structured similarly to the discount table shown here in the example: attached is the discount table

Step 2: The rules can now be made simpler by taking the following aspects into account:

a) When a consumer completes the survey form AND opts into the newsletter, according to Rules 1 and 2, they qualify for a discount if their order exceeds $100. This leads to two distinct rules being formulated while the third condition (order quantity) holds significance.

b) If the buyer fills out the survey form OR subscribes to the newsletter, as indicated by Laws 3, 4, 5, and 6, they will benefit from free shipping, regardless of the order amount. As a result, this situation can be divided into two individual rules, where at least one requirement is satisfied, but not both.

c) When a customer fails to meet any requirements, corresponding to Rules 7 and 8, the order value will not qualify for either free shipping or discount. This can be seen as a single law. The linked simplification table illustrates this.

7 0
14 days ago
Suppose we are sorting an array of eight integers using quicksort, and we have just finished the first partitioning with the arr
Rzqust [894]

Answer:

c. The pivot could either be 7 or 9.

Explanation:

When sorting an array of eight integers through quicksort, the first partitioning indicates that either 7 or 9 may serve as the pivot. Observing the array, it is specifically 7 and 9 that occupy their correct positions within the ordered array. All integers preceding 7 and 9 are lesser, and all numbers following them are greater. Therefore, it suggests that the pivot is located between 7 and 9.

6 0
20 days ago
(Java) Which of the following code segments correctly declare a Strings and gives it a value of "fortran".
maria [879]

Response:

IT F

Clarification:

8 0
1 month ago
CHALLENGE ACTIVITY 2.1.2: Assigning a sum. Write a statement that assigns total_coins with the sum of nickel_count and dime_coun
Harlamova29_29 [932]

Answer:

In Python:

total_coins = nickel_count + dime_count

Explanation:

The sums of nickel_count and dime_count are combined and assigned to total_coins.

Cheers.

8 0
29 days ago
Other questions:
  • How to code 2.9.5: Four colored triangles {Code HS}
    10·1 answer
  • Light travels at 3 × 108 meters per second. A light-year is the distance a light beam travels in one year.Write a PYTHON program
    14·1 answer
  • Marien is using the Council of Science Editors (CSE) style guidelines to write her research paper. What is her most likely topic
    13·1 answer
  • Consider the following skeletal C program: void fun1(void); /* prototype */ void fun2(void); /* prototype */ void fun3(void); /*
    11·1 answer
  • explain why entrepreneurial activities are important to social development and progress of the econo​
    9·1 answer
  • What is the other name designated to a game master of multiplayer online games (MMOs)?
    11·2 answers
  • The position of a runner in a race is a type of analog data. The runner’s position is tracked using sensors. Which of the follow
    8·1 answer
  • What advantage do ExpressCard modules and USB adapters offer over expansion cards?
    5·1 answer
  • What feature would be used to collect how many times users downloaded a product catalog?
    11·1 answer
  • Redo Programming Exercise 16 of Chapter 4 so that all the named constants are defined in a namespace royaltyRates. PLEASE DONT F
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!