Rewrite the program for Question 3 in Homework 1. Your program should ask for the number of items a customer bought and the price of each item, then displays the subtotal, the amount of sales tax (8.75%), and the total amount as follows. Your program should use lambda and higher-order functions to calculate the sum of item prices with two decimal Test your program with 3 customers for the output!

Part1-Python Programming

  1. Rewrite the program for Question 3 in Homework 1. Your program should ask for the number of items a customer bought and the price of each item, then displays the subtotal, the amount of sales tax (8.75%), and the total amount as follows. Your program should use lambda and higher-order functions to calculate the sum of item prices with two decimal

Test your program with 3 customers for the output!

 

Sample Output)

Enter your number of purchased items: 5 Enter the price of item #1:                                 20

Enter the price of item #2:              20

Enter the price of item #3:              20

Enter the price of item #4:              20.56

Enter the price of item #5:              40.34

 

Subtotal : $ 120.90 Sales Tax: $ 10.58

Total Amount: $ 131.48

 

 

 

  1. Create a Python dictionary ‘GradeBook’ for the following table with ID as key

 

ID Name M1 E1 Score Grade
2002 John 87 10 90 A
2008 Paul 83 59 77 C
2010 Gilbert 77 89 84 B

 

  1. Display your dictionary
  2. Replace the values for Name, Score, and Grade of a student whose ID is 2010 with new values

Jane, 88, and B+ and display the change in the output

2002 John A
2008 Paul C
2010 Jane B+

 

  • Write a program that displays ID, Name, and Grade as follows: ID Name Grade

 

  1. Python module ‘random’ generates a random number between 0 and 1 as

 

import random random.seed(1) random.random()

 

output: 0.13436424411240122

 

  1. Create a horizontal list of 100 random numbers with 5 decimal places as the following. [‘0.18019’, ‘0.48736’, ‘0.07759’, ‘0.52257’, ‘0.91964’, … ]

 

  1. Write a function that takes the above horizontal list of 100 random numbers as an argument and returns the list of random numbers without zero and dot(.) as the

 

[‘1819’, ‘48736’, ‘7759’, ‘52257’, ‘91964’, … ]

 

 

 

 

  1. Download and open the file named ‘finnews’ in the homework folder of the Course Blackboard

 

  1. Copy the entire text and assign it to a variable named ‘finnews’
  2. Count the total number of all characters in the text ‘finnews’
  3. Write a function that counts the number of alphabets, numerical digits, and special characters, and returns them
  4. Write a function that takes the function for (c) as an argument. Then it checks if the answer from (b) and the total sum from (c) are the same or not. Your function should display appropriate messages depending on the result such as

‘Your function for (c) is not correct. Please fix it!’ or

‘ Your function for (c) is correct. Good Job!’

 

Part2-Statistics

 

  1. The resting heart rates for a sample of individuals are normally distributed with a mean of 70 and a standard deviation of 15. Use the 68.3-95.4-99.7 rule to find the percentage of heart rates in the following

 

  • less than 55 2) greater than 85                               3) between 55 and 85

 

 

  1. Scores on a chemistry exam are normally distributed with a mean of 67 and a standard deviation of Calculate the followings using Python. Show your codes and outputs!

Decimal numbers should be rounded to the nearest thousandth digit.

 

  • What is the standard score for an exam score of 88?
  • About what percentage of the exam scores were above 83
  • What is the percentage of scores below 59?
  • What is the percentage of scores above 65 and below 85
  • Suppose that 1000 students took the test. About how many students scored above 75?

 

 

  1. Find the approximate standard score using Python. Show your codes and outputs!

 

  • A standard score in the 99th percentile
  • A standard score in the 45th

 

  1. University conducts research on the performance of students in a business course by randomly selecting 50 students course scores as follows:

[82, 99, 97, 73, 94, 94, 71, 74, 94, 90, 99, 77, 78, 91, 79, 86, 79, 99, 94, 85, 70, 83, 75, 85, 82,

95, 84, 78, 85, 77, 85, 82, 71, 78, 80, 86, 82, 88, 83, 94, 77, 91, 86, 77, 89, 82, 91, 85, 70, 98]

Use Python to construct 90%, 95%, and 99% confidence intervals for the average course score of all students. Use 2 decimal places for the output. Show your codes and outputs!

  1. You randomly select 20 mortgage institutions and determine the current mortgage interest rate. Use Python to construct 90%, 95%, and 99% confidence intervals for the current average mortgage rate. Use 4 decimal places for the output. Show your codes and outputs!

 

[0.0513, 0.0597, 0.0538, 0.0562, 0.0567, 0.0591, 0.0597, 0.0586, 0.0551, 0.0535,

0.0555, 0.0575, 0.0584, 0.0539, 0.0561, 0.0593, 0.0579, 0.0599, 0.0501, 0.0575]

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!