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
topjm [15]
3 years ago
13

Define a function dice(n) that returns the sum of a random roll of n 6-sided dice. Example output in photo. Thank you

Computers and Technology
1 answer:
leonid [27]3 years ago
6 0

Answer:

code (in python) is in the explanation

Explanation:

import random

def dice(n):

   count = 1

   t = list()

   while count <= n:

       i = random.randint(1,6)

       t.append(i)

       count += 1

   print(sum(t))

Hope this helps!

You might be interested in
Describe business benefits of using wireless electricity?
Triss [41]

Answer:

To put it simply, the main benefit for a business to use wireless electricity is money.

Explanation:

Assuming that the company in question can solve specific hurdles such as Microwave Interference and Implementation costs. Then they would save a huge amount of money in the mid to long term since wireless electricity needs very little landscape and does not need cables and transmitting towers as opposed to traditional electrical systems.

Hope you have found this explanation helpful and If you have any more questions please feel free to ask them here at Brainly, We are always here to help.

3 0
3 years ago
Why do we use computers?<br><br>​
Nina [5.8K]

Explanation:

Computers are very useful machines..We use it for creating presentations, creating documents, creating many more things that are made nicely by computer..

6 0
3 years ago
Read 2 more answers
The article begins with the author mentioning the need to find something from “three years ago”. How long do you see yourself sa
Zigmanuir [339]
I'm going to ask this are you asking us how long we see ourselves saving files or what?
7 0
3 years ago
What is the purpose of fcc?
melamori03 [73]
<span> The Bureaus and the Office of Engineering and Technology process applications for licenses and other filings, analyze complaints, conduct investigations, develop and implement regulatory programs and participate in hearings, among other things. </span>
3 0
3 years ago
Suppose a program written in language L1 must be executed on a machine running a program running in language L0. What important
Whitepunk [10]

Question Completion with Options:

a. Translation of the entire L1 program into L0 code

b. Translation of the L0 program into L1 code

c. Creation of a language L3 that interprets L0 instructions

d. Interpretation of each L1 statement using L0 code as the L1 program is running.

Answer:

The important operations that must take place in this scenario are:

a. Translation of the entire L1 program into L0 code

d. Interpretation of each L1 statement using L0 code as the L1 program is running.

Explanation:

Translation enables decoding to take place.  This means that the L1 program is decoded into a language that the L0 program can understand and execute.  Without this translation, the higher level language of L1 will not be understood by the machine language of the L0 programs.  Translation of a code creates a shared understanding, thereby easing program execution.  Code translation is simultaneously accompanied by interpretation.

8 0
4 years ago
Other questions:
  • The efficiency for recursively traversing a chain of linked nodes is
    15·1 answer
  • There are 55 registers, and total 60 instructions available in a general-purpose computer. The computer allows only 2-address in
    14·1 answer
  • When are the malls going to open
    5·2 answers
  • Video-sharing sites allow videos to be uploaded in which file format? A. .avi B. .svg C. .tiff D. .xls
    5·1 answer
  • Write code to print the location of any alphabetic character in the 2-character string passCode. Each alphabetic character detec
    8·1 answer
  • If you had the choice to pick one car in the world for free.. what car would you
    10·1 answer
  • George enters the types of gases and the amount of gases emitted in two columns of an Excel sheet. Based on this data he creates
    6·1 answer
  • URGENT: I need to add a while loop in this program but I don't know-how. I am also having trouble neatening some lines of code.
    15·1 answer
  • When converting the relationships to the relational model and the database schema, it is possible that some of the relationships
    15·1 answer
  • Eating food while drinking speeds up alcohol<br> absorption.<br> True<br> False
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!