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
g Write a function named vowels that has one parameter and will return two values. Here is how the function works: Use a while l
lianna [129]
10-20-100.40 = my bin =nice
5 0
2 years ago
What is the purpose of the print area feature​
Otrada [13]

Answer: The Print Area function in Excel allows you to print part of a spreadsheet rather than the full sheet

Explanation:

3 0
3 years ago
Fact Pattern: A sales transaction record designed to contain the information presented below. Column Information 1-10 Customer a
ozzi

Answer:

The answer is field check.

Explanation:

The sales transaction record was designed to enter information by range, so the data validation is oriented for range validation and not for a specific logic. In other words, the transaction will check if the information is in a valid range and not if the information is logically valid.

4 0
3 years ago
Problems and Exercises 16 through 43 are based on the entire ("big" version) Pine Valley Furniture Company database. Note: Depen
lesya [120]

Answer:

SQL queries

The command used to display the customer ID and total number of orders placed is given below

Query:

SELECT CustomerID, COUNT (orderID) AS TotalOrders

FROM Order_Table

GROUP BY CustomerID

Explanation:

SQL queries

The command used to display the customer ID and total number of orders placed is given below

Query:

SELECT CustomerID, COUNT (orderID) AS TotalOrders

FROM Order_Table

GROUP BY CustomerID

SELECT - To query the database and get back the specified fields SQL uses the select statement

CustomerID is a coloumn name

The function COUNT(OrderID) returns the number of orders

Totalorderds is a label

FROM - To query the database and get back the preferred information by specifying the table name

Order_Table is a table name

GROUP BY - The clause is used to group the result of a SELECT statement done on a table where the tuple values are similar for more than one column

The table below displays the CustomerID and total number of orders placed

CustomerID                                              Totalorders

4                                                                    28

1                                                                      6

12                                                                    5

16                                                                    5

6                                                                     3

9                                                                     3

15                                                                    3

3                                                                     1

13                                                                    1

14                                                                    1

The table below shows the total number of orders situated for each sales person

SalesPerson_ID                                         TotalOrders

3                                                                    16

2                                                                     3

4                                                                     3

5                                                                     3

3 0
3 years ago
Structured walk-throughs take place throughout the SDLC and are called _____ reviews, depending on the phase in which they occur
Tpy6a [65]

Answer:

design

Explanation:

Based on the information provided within the question it can be said that these are called design reviews. This is one of the most important parts of the development of a system. This focuses more on answering how something is going to be done in the system as opposed to answering what is going to be done for the system depending on the questions asked in the analysis phase.

5 0
3 years ago
Other questions:
  • An individual is first with the network before they are authorized to access resources on the network A. countermeasure B. vulne
    11·1 answer
  • What is the simplest way to permanently get rid of a unwanted file
    12·1 answer
  • The company currently runs 60 autonomous APs and has plans to increase wireless density by 50% in the near future
    13·1 answer
  • The icon below represents the ____________.
    8·1 answer
  • You are almost finished updating a Website. As part of the update, you have converted all pages from HTML 4.0 to HTML5. The proj
    7·1 answer
  • My feelings alwayss T-T
    14·2 answers
  • You can fit more RAW files on a memory card than JPEG files. true or false
    10·1 answer
  • Fill in the blanks in the SQL statement below that will list the invoice number, invoice total and credit which is the total sum
    14·1 answer
  • Identify and state the value of hardware components​
    12·1 answer
  • The area that we can see just after windows is started is subject​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!