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
kakasveta [241]
3 years ago
13

You have been given the following String which represents a series of 6 side die rolls:rolls = "1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,

2"Write a program that analyzes the rolls and computes the following:
i. The total # of rolls.
ii. The sum of all the rolls (1+2+3…)
iii. The average value of the rolls.

Here is a sample output of your program:Total # of rolls: 17Total value of all rolls: 49Average roll: 2.88235P art 2 – Can you extend your code such that the string (for the series of die rolls) is a user input?

Computers and Technology
1 answer:
Anni [7]3 years ago
8 0

Answer:

see explaination

Explanation:

rolls="1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,2"

list1 = list(rolls.split(","))

print("The total # of rolls: {}".format(len(list1)))

j=0

for i in list1:

j+=int(i)

print("Total value of all rolls: {}".format(j))

print("Average roll: {}".format(j/len(list1)))

Please kindly check attachment for program code and output

You might be interested in
Design a database to keep data about college students, their academic advisors, the clubs they belong to, the moderators of the
alekssr [168]

Answer:

Complete design is attached below.please have a look.

Explanation:

8 0
3 years ago
Read 2 more answers
Which of the following statements about cover letters is false?
zzz [600]
Among the choices given, the one that is considered false is <span>c. A cover letter is sent before a résumé so that the employer knows it is coming. This is because a cover letter is sent along with the applicant's resume. The cover letter is an optional message to the employer before he/she reads the resume. A cover can convey a person's personality, skills, and abilities.</span>
6 0
3 years ago
Read 2 more answers
What does the W in WAN represent
Ilya [14]
WAN stands for Wide Area Network.
7 0
3 years ago
Read 2 more answers
Which of these functions may be used with positional arguments? Select four options.
Snezhnost [94]

Answer:

AVERAGE

COUNT

SUM

MAX

Explanation:

e2020

8 0
3 years ago
Dan needs to ensure that delegates as well as those looking at his shared calendar information are unable to see the details of
Klio2033 [76]

Answer:

If Dan uses Google Calendar application, he may edit the public visibility to "private" mode. Then, only the host of the meeting can see details. Usually can he hide the guest list but the meeting agenda is unlikely.

Explanation:

3 0
3 years ago
Other questions:
  • What term is used to describe a chipset developed and promoted by the U.S. government from 1993 to 1996 as an encryption device
    9·1 answer
  • What control features will you use in the input screens to aid in data entry? give a specific example of how you will use at lea
    6·1 answer
  • Which of the following techniques would a Baroque composer most likely employ to evoke an affect of agitation? Select one:
    14·1 answer
  • Provide instance fields for title, month, and year (for example, "Scientific American", "April", 2020). Each of these should be
    13·1 answer
  • Can a idler gear increase or decrease torque?
    7·1 answer
  • NEED HELP
    9·1 answer
  • Which of the following statements is true of San serif fonts?
    12·2 answers
  • Where to get industrial circuits far cry 6
    8·1 answer
  • Help me please. I dont really understand this.
    12·2 answers
  • When you're writing for mobile devices, use ________ to present the most important information first and provide successive laye
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!