Exercise 1 Procedural vs Functional Programming Solution

$30.00 $24.00

Problem Definition: Given a list of numbers and words, find the count of each element type in the list. Example: Example: L = [2, 3, ’word’, -1, ’python programming language’, 9, 321] Count of Numbers: 5 Count of words: 4 Write a pure python code (No external libraries) to achieve the following: Create a function…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Problem Definition:

Given a list of numbers and words, find the count of each element type in the list.

Example:

Example: L = [2, 3, ’word’, -1, ’python programming language’, 9, 321]

Count of Numbers: 5

Count of words: 4

Write a pure python code (No external libraries) to achieve the following:

  1. Create a function the will randomly generate a list of N numbers and words. Numbers and words count are random and the order is random too.

  1. Create two functions to calculate the desired output as follows:

    1. Procedural code by using loops

    1. Functional code by using list comprehension.

  1. Use TimeIt standard library and matplotlib to present the performance difference among the 2 solutions for different list sizes (N=100, 1000, 10000, 100000).

Exercise 2 – Simple Student Grading System – memory based

In a given course the following applies (a CSV data set exams.csv file is attached):

  • The system track students by student name and unique ID.

  • Grades are based on:

  1. Exams Score (40% of the final grade) o Projects Score (30% of the final grade) o Quizzes Score (30% of the final grade)

  • Final Grades based on final score (out of 100) As follows:

o [90-100]:A ; [80-90): B ; [20-80): C ; [10-20): D ; [0-10): F

Create a data structure (dict!) to store the class related information.

Provide the system user with a console based menu as follows:

  • Load the data set from exams.csv file (file is comma delimited).

  • Print a list of student names, final scores, and letter grades sorted by names.

  • Print score summary (Student Count, Min, Max, mean, mode, and standard deviation)

  • Identify values that are larger than the mean and two times standard deviation

  • Plot a pie chart showing the final letter grades distribution.

  • Create box plots parameters (not drawing them but just computing the numbers [min, max,

medial, Q1, Q3] for a box plot).

    • Exit the system.

  • Make your own assumptions but usability counts

  • Functions and readability counts.

  • Only core python built-in data types.

Exercise 3 –

Pick an extension library from PyPI or other sources (something of interest to you). Summarize the functionality provided by the library (one paragraph) and show a usage example.

Document step-by-step how to run the example provided.

PyPI: https://pypi.python.org/pypi

Exercise 1 Procedural vs Functional Programming Solution
$30.00 $24.00