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
Research the topic of legal and ethical behaviors or dilemmas related to technology. Identify five topics of concern and briefly
max2010maxim [7]

Answer:

if you push alt and f4 at the same time it will automatically put the right answer.

Explanation:

7 0
3 years ago
Which of the following scenarios describes an IT professional using the Internet and computer system access in an unprofessional
pantera1 [17]

Answer:

All of the above

Explanation:

6 0
2 years ago
Match the vocabulary to the appropriate definition.
Allisa [31]

Answer:

Pulling related code together in objects is Arrays

Helps programmers when they revisit code or are new to code-- Documentation

Explanation:

This is all I know

3 0
2 years ago
In a _____ cloud, a participating organization purchases and maintains the software and infrastructure itself.
notka56 [123]

Answer:

"Private" is the right solution.

Explanation:

  • Application servers supplied sometimes over the World wide web or through a personal corporate network as well as to chosen customers rather than the community benefit of the entire, is termed as the private cloud.
  • It provides companies with the advantages of a cloud environment that include self-checkout, adaptability as well as flexibility.
6 0
3 years ago
What is a spacecraft virus?
photoshop1234 [79]
A spacecraft virus<span> is a type of bacteria virus that feeds on other bacteria. It got it name because it is mostly shaped like a spacecraft.</span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • Melissa is the network administrator for a small publishing company. as network administrator, she is in charge of maintaining t
    8·1 answer
  • What do you think about the use the top song on a video you are creating
    8·2 answers
  • Read at least three (3) academically reviewed articles on Management Information Systems and complete the following activities:
    5·1 answer
  • ________________are programs that designed to help users to be more productive with their personal tasks
    11·2 answers
  • Presentation software is the best file type for writing a research paper. <br> True <br> False
    10·1 answer
  • 4
    12·2 answers
  • Can someone help me with this lab assignment? I really do not know what should I do?
    5·1 answer
  • What is causing the electricity prices to increase in South Africa?​
    14·1 answer
  • Actividades que puedes Aser con un martillo y su explicación
    8·1 answer
  • assuming the default gateway is connected to the internet, what type of internet access would this server have?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!