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
Vikentia [17]
3 years ago
8

What expressions will initialize d with a random value such that all possible values for d are given by the inequality 1.5 ≤ d &

lt; 7.5?
Computers and Technology
1 answer:
Kaylis [27]3 years ago
7 0

Answer:

The solution code is written in Python

d = 1.5 + random.random() * 6

Explanation:

By presuming the Python random module is imported, we can use the <em>random</em> method to generate a random number.  <em>random.random()</em> will give us a value in the range [0, 1). The ensure the lower limit is 1.5 instead of 0, we can add 1.5 to random.random()

  •      1.5 + random.random()

This expression will give any value in range [1.5, 2.5)

To ensure the upper limit is set to 7.5, we tweak the previous expression to

  • 1.5 + random.random() * 6  

This expression will always multiply a random number from [0,1) with 6 and then only added with 1.5. This will always produce a random number that fulfill the inequality 1.5 ≤ d < 7.5

You might be interested in
Most browsers allow you to maintain your most frequently visited websites. what is this called? Special place holder, secret lis
Fed [463]
The answer is bookmark
4 0
2 years ago
Read 2 more answers
Who are the founders of video-sharing site Dailymotion?
Pavlova-9 [17]

In March 2005, Benjamin Bejbaum and Olivier Poitrey founded the Dailymotion website from the living room of Poitrey's apartment in Paris. Six individuals pooled together €6,000 ($9,271 USD) to start the business. In September 2006, Dailymotion raised funds in collaboration with Atlas Ventures and Partech International. They raised 7 million euros which was considered to be the most funds raised in 2006 from the French Web 2.0. In October 2009, the French government invested in Dailymotion through the Strategic Investment Fund. On 25 January 2011, Orange acquired a 49% stake in Dailymotion for €62 million, valuing the company at €120 million.[6]


4 0
2 years ago
Heather writes an essay for language arts and receives a poor grade. To figure out why she gets a poor grade, Heather looks at t
Kazeer [188]

Answer:

Glows and grows strat

Explanation:

4 0
2 years ago
Read 2 more answers
How many points do I need to be able to message people
hammer [34]

That is a good question

8 0
3 years ago
Read 2 more answers
write the structure of an email message ques.2 what do you mean by search engine? write its component .ques. 3 what are the adva
loris [4]

Answer:

1.....There is a standard structure for emails. Email contents are primarily classified as two, the header and the body. We are going to see the contents come under the two subparts. The email header gives us common details about the message such as the unique identity of the message.

Explanation:

2......a program that searches for and identifies items in a database that correspond to keywords or characters specified by the user, used especially for finding particular sites on the World Wide Web.

its components are ....

A search engine normally consists of four components e.g. search interface, crawler (also known as a spider or bot),indexer, and database.

3.....Advantages Of eLearning

It is a very efficient way of delivering courses online. Due to its convenience and flexibility, the resources are available from anywhere and at any time. Everyone, who are part time students or are working full time, can take advantage of web-based learning.

hope this will help you ..

please like and mark as brilliant.

4 0
2 years ago
Other questions:
  • These are questions from my Computer/Customer Support Class
    6·1 answer
  • PLS ANSWER ASAP!
    9·1 answer
  • How do governments correct for negative externalities?
    5·1 answer
  • A large amount of scatter in a scatterplot is a indication that the association between the two variables is
    13·2 answers
  • What is the data and information with example? ​
    9·1 answer
  • Identify the correct characteristics of Python tuples. Check all that apply.
    9·1 answer
  • 10. List three adaptations of wind-pollinated plants to promote pollination.<br>​
    12·1 answer
  • 1.a computer can create an output based on the input of the user.
    13·1 answer
  • Assume the size of an integer array is stored in $s0 and the address of the first element of the array in the memory is stored i
    10·1 answer
  • Question 12 (5 points)
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!