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
What is the size of the program counter for an avr that has a 1 kbyte rom capacity?
horsena [70]

Answer:

9 bits

Explanation:

 We all recognize 1 K bytes as =1024 bytes.  

And the storage medium used for program instructions are the non-volatile flash memories. The MCUs are always 8 bits, and a piece of the instructions revenues two or one 16-bit words. Besides we know program memory magnitude through the device name, and as an instance, the ATmega64x line emanates with 64KB of flash, and the ATmega32x line emanates with 32 KB. And there is nobody like off-chip program memory, and all of the codes that are being implemented by the AVR essentially be on the on-chip flash. However, this restraint is not ever applied to the AT94 FPSLIC AVR/FPGA chips. Also, you must know that AVR is a family of microcontrollers established by ATEL in 1996. It is a Harvard architecture type single-chip 8-bit RISC microcontroller. And it is supposed to be the first microcontroller which applied flash memory for storing the program They are heavily used in embedded systems.  

1k byte = 1024 bytes, However, if the program instruction takes 16 bits.  

And hence it only wishes 512.  

Here and now 512 = 10^9, and henceforth you necessitate 9 bits at minimum.  

excluding you can somehow paginate that (such as through one-bit pagination, you will be necessitating only 8 bits and so on.)  

Therefore the answer here = 9 bits.

5 0
3 years ago
We write programs as a sequence of operation. they flow through the computer as?
lys-0071 [83]
I belive the correct answer would be binary code because computers see the coding as 00100001 
5 0
4 years ago
How to unblock your Wi-fi if it is blocked by your administrator .
alexgriva [62]

Answer:

you dont

Explanation:

you ask the admin to unblock it. if you dont know who did it, you had your ip grabbed and you cant do anything but call the police.

3 0
3 years ago
Whereas enterprise network convergence focuses on the consolidation of traditionally distinct voice, video, and data communicati
Vinil7 [7]

Answer: Unified communication

Explanation: Unified communication is the communication technique in which merges various communication routines into a individual business.It works as the phone system which helps in increment of productivity in an organizational business.

The unifying of voice,data/information,video etc is done for optimizing and improving the business that also results in  faster communication rates, secure communication etc.

4 0
3 years ago
How many bits would be needed to count all of the students in class today? There are 16 children in the class.
viva [34]

Answer:

There will be 23 beats per children

3 0
3 years ago
Other questions:
  • Group technology identifies components by a coding scheme that specifies the
    13·1 answer
  • Which group on the Home Ribbon contains the line spacing attribute?
    9·2 answers
  • Tablets combine the features of which two types of devices?
    10·2 answers
  • I need help <br> Match each words with its definition!!!<br> Please helpppppppp
    12·1 answer
  • You are managing a global news website which has a very high traffic. To improve the performance, you redesigned the application
    10·1 answer
  • Five Star Retro Video rents VHS tapes and DVDs to the same connoisseurs who like to buy LP record albums. The store rents new vi
    13·1 answer
  • 20. The following are considered as ICT skills EXCEPT
    15·1 answer
  • Does technology always follow the science,yes or no explain why to choice
    13·1 answer
  • This question involves the creation and use of a spinner to generate random numbers in a game. a gamespinner object represents a
    8·1 answer
  • What does a computer monitor look like when struck really hard?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!