Starting from:
$35

$29

COMP 3006 Programming Assignment 4 Solution

Assignment 4.1:

Instantiate an object of the class Counter (import it from collections) and use it

to determine the three most common numbers that appear when you simulate 100 rolls of a fair six-sided die. Display them along with how many times they appeared.

Assignment 4.2:

Instantiate a double ended queue data structure (deque). Fill it with six given names of movie stars. Insert new names in the middle and on both ends. Display the result. Remove two of the original names. Display the result. Remove the entry from the front and the entry at the rear. Display the result.

Assignment 4.3:

Define a function that converts temperature from Celsius to Fahrenheit. Declare a list of ten numbers and use the map method to convert them from Celsius to Fahrenheit. Using a lambda function, display the values of those original numbers when they are the arguments to the sine function. Use filter to display only the non-negative values from the last result.

Upload a zip of your source file(s).

More products