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
Levart [38]
3 years ago
10

Write a program which simulates the result of a person choosing 3 objects in a random order out of a box containing 3 objects in

total. The box contains the following 3 objects: apple, ball, cat. A single selection pass of your program describes the random selection of 3 objects out of the box, without replacement. This means that a particular object can only be selected from the box once. At the beginning of a pass, the box is full, so it contains all 3 objects. After an object is selected from the box, your program will print the name of the object and then choose another object without replacing the previous object. The selection process repeats 3 times until the box is empty
Computers and Technology
1 answer:
Leviafan [203]3 years ago
6 0

Answer:

Explanation:

The following code is written in Python, it loops through a list (box) of the objects and randomly choosing one of the objects. Prints that object out and removes it from the list. Then repeats the process until the box is empty.

import random

box = ['apple', 'ball', 'cat']

print(box)

for x in range(len(box)):

   pick = random.randint(0,len(box)-1)

   print("Pick " + str(x+1) + ": " + box[pick])

   box.remove(box[pick])

print(box)

You might be interested in
Which of the following is the fundamental unit of the virtualized client in an IaaS deployment? a)Workload b)Workspace c)Work un
forsale [732]

Answer:

a. Workload

Explanation:

The most fundamental unit of the virtualized client in an IaaS deployment is the workload because it simulates the potential of a certain server to perform a specific amount of work given.

6 0
3 years ago
A museum is evaluating historical documents for authenticity, reviewing their physical condition, and categorizing them by subje
ZanzabumX [31]

Answer:

Option C

Explanation:

The museum authority can easily automate the process of storage of data on cloud once the document is prepared.

This shall help is easy access to data to all and will also prevent issues arising because of non storage of data or some form of mis-happening leading to data loss.

3 0
3 years ago
In python please.
hjlf

There is a variable, state_capitals, that refers to a dictionary that maps U.S. states to their capitals, and another dictionary, provincial_capitals, that maps Canadian provinces to their capitals. Associate a dictionary that maps states or provinces to their respective capitals with a variable, regional_capitals.

Explanation:

The below code is done in python.

{provincial_capitals.keys} + (state_capitals.keys) == regional_capitals

regional_capitals = {}

regional_capitals.update(state_capitals)

regional_capitals.update(provincial_capitals)

3 0
3 years ago
Given a effective delay of 99ms when network usage is 74%, what is the effective delay when network usage = 84% ?
NARA [144]

148.5 ms is the effective delay when network usage = 84% .

<h3>what is a computer network?</h3>
  • A group of computers sharing resources that are available on or offered by network nodes is known as a computer network.
  • Over digital links, the computers communicate with one another using standard communication protocols.
  • These connections are made up of telecommunication network technologies, which are based on physically wired, optical, and wireless radio-frequency means and may be set up in a number of different network topologies.
  • Personal computers, servers, networking equipment, and other specialized or general-purpose hosts can all function as nodes in a computer network.
  • They can have hostnames and are identifiable by network addresses.
  • After being assigned, hostnames act as recognizable labels for the nodes and are seldom updated.
  • Network addresses are used by communication protocols like the Internet Protocol to locate and identify the nodes.

To learn more about the topic, refer to the following link

brainly.com/question/8118353

#SPJ4

3 0
2 years ago
Software is the brain of computer. Explain this starement
Annette [7]

here you go

i hope this helps you

5 0
3 years ago
Other questions:
  • If a movie starts at 305 and the movie is 2 hrs and 44 mins when does the movie end?
    14·1 answer
  • Operating software is a must in every software (a) True (b) False
    8·1 answer
  • Shawn works at the local electrical company in Nampa, ID, which provides electricity to the entire city of Boise. This area is p
    14·1 answer
  • You have heard that it is possible to improve your computer's performance by storing all related files for a particular program
    9·1 answer
  • What does the following if statement do?<br><br> if (num1 == Math.abs(num1))
    12·1 answer
  • What tool is used to edit pre-existing range names? (check all that apply)?
    10·1 answer
  • Which step in the software development life cycle involves making improvements based on user feedback?
    13·2 answers
  • PLSSS HELP!! During the late 20th century, immigration to the United States increased dramatically from
    7·1 answer
  • Que es la papirofobia​
    13·2 answers
  • if prakash gives one of the marble from what he possessses to kamala then they will have equal number of marbles.if kamala gives
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!