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

This standard library function returns a random floating-point number in the range of 0.0 up to 1.0 (but not including 1.0).

Computers and Technology
1 answer:
natulia [17]3 years ago
5 0

Answer:

The answer would be A: Random

Explanation:

The random() function returns a generated random number (a pseudorandom number)

You might be interested in
A client calls to complain that his computer starts up, but crashes when Windows starts to load. After a brief set of questions,
melomori [17]

Answer:

It may be that the amount of ram is not compatible with that computer, it may not support ram that is over 8 GB or higher, it may not be properly installed in the hardware, or the motherboard may not be able to read it.

Explanation:

Hardware and software is very unbalanced when it comes to new RAM being installed, as people complain about this exact same issue many times.

5 0
4 years ago
find_cow(name, cows) Given a name and a Python list of Cow objects, return the Cow object with the specified name. If no such Co
nadya68 [22]

Using the computational knowledge in python it is possible to write a code that Given a name and a Python list of Cow objects

<h3>Writting the code in python:</h3>

<em>def load_cows(filename):</em>

<em>      cow_dict = dict()</em>

<em>    f = open(filename, 'r')</em>

<em> </em>

<em>    for line in f:</em>

<em>        line_data = line.split(',')</em>

<em>        cow_dict[line_data[0]] = int(line_data[1])</em>

<em>    return cow_dict</em>

<em>def greedy_cow_transport(cows, limit=10):</em>

<em>       trips = []</em>

<em>    cowsCopy = cows.copy()</em>

<em>    sortedCows = sorted(cowsCopy.items(), key=lambda x: x[1], reverse = True)</em>

<em>    while sum(cowsCopy.values()) > 0:</em>

<em>        ship = []</em>

<em>        total = 0</em>

<em>        for cow, value in sortedCows:</em>

<em>            if cowsCopy[cow] != 0 and value + total <= limit:</em>

<em>                ship.append(cow)</em>

<em>                total += value</em>

<em>                cowsCopy[cow] = 0</em>

<em>        trips.append(ship)</em>

<em>    return trips</em>

<em>def brute_force_cow_transport(cows,limit=10):</em>

<em>     trips = []</em>

<em>     possibilities = []</em>

<em>    for i in power_list:</em>

<em>        ship = []</em>

<em>        for j in i:</em>

<em>            ship_weights = []</em>

<em>            for k in j:</em>

<em>                ship_weights.append(cows[k])</em>

<em>                #print(ship_weights)</em>

<em>            ship.append(sum(ship_weights))</em>

<em>            #print(ship)</em>

<em>        if all(d <= limit for d in ship):</em>

<em>            possibilities.append(i)</em>

<em>      pruned_possibilities = []</em>

<em>    for k in possibilities:</em>

<em>        if k not in pruned_possibilities:</em>

<em>            pruned_possibilities.append(k)</em>

<em>    # now find the minimum list length:</em>

<em>    min_list_len = min(map(len, pruned_possibilities))</em>

<em>    for l in pruned_possibilities:</em>

<em>        if len(l) == min_list_len:</em>

<em>            return l</em>

<em>       </em>

<em>def compare_cow_transport_algorithms():</em>

<em>       greedy_start = time.time()</em>

<em>    greedy_results = greedy_cow_transport(cows, limit = 10)</em>

<em>    greedy_end = time.time()</em>

<em>    print('Greedy Algorithm time:', greedy_end -greedy_start)</em>

<em>    brute_force_start = time.time()</em>

<em>    brute_force_results = brute_force_cow_transport(cows, limit = 10)</em>

<em>    brute_force_end = time.time()</em>

<em>    print('Brute force time:', brute_force_end - brute_force_start)</em>

<em>    print('Greedy Algorithm results:', greedy_results)</em>

<em>    print('Number of trips returned by Greedy Algorithm:', len(greedy_results))</em>

<em>    print('Brute Force Algorithm results:', brute_force_results)</em>

<em>    print('Number of trips returned by Brute Force Algorithm:', len(brute_force_results))</em>

   

See more about python at brainly.com/question/13437928

#SPJ1

4 0
2 years ago
In this assignment, you will need to design a complete Black-Box testing plan for the following program. A computer science stud
murzikaleks [220]

Answer: sorry i need points to ask a question hope u understand...

Explanation:

8 0
3 years ago
Which one of these is NOT a physical security feature you should check when inspecting your hotel room? (Antiterrorism Scenario
Lostsunrise [7]

Answer:

D. Lockbox or safe

Explanation:

Anti- terrorism is a disastrous event, planned by insurgents to take lifes. They can attack any unsecure environment.

When a guest lodges in a hotel, for security reasons (Anti-terrorism training), he/she must consider the distance of the room to an emergency exit, also the quality of the door mounted and then the functionality of the door and window locks.

Safes or lock-box are used to secure money and other material valuables, but not life.

3 0
3 years ago
How did mechanical clocks assist in completing work? How was work done previously?
lozanna [386]

Answer

Timekeeping has been a part of society since Ancient Egypt. The use of spring-powered mechanisms allowed clocks to be made smaller ... Essentially, the church bells and the mechanical clock now became the monitor of the working day.

Explanation:

4 0
3 years ago
Other questions:
  • Based on the relational model, create the database metadata as part the physical designphase.b)from the metadata, write the sql
    10·1 answer
  • What is requirement analysis
    8·1 answer
  • The mac group does not replace the primary functions of eocs or other dispatch organizations. True or False
    8·1 answer
  • This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by
    8·1 answer
  • escribe and explain at least three improvements you think came about with the introduction of intrusion prevention technology. J
    10·1 answer
  • your computer running Windows 10 is doing some very strange things with operating system you are fairly certain it is not a hard
    13·2 answers
  • Consider the following two tables where EmployeeNum is primary key in both tables. What is the result of combining the two table
    15·1 answer
  • Create an application named StudentsStanding.java that allows you to enter student data that consists of an ID number, first nam
    12·1 answer
  • A group of students writes their names and unique student ID numbers on sheets of paper. The sheets are then randomly placed in
    15·1 answer
  • What is operating system​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!