Programming 511 Assignment 2 (2023 Updated)
Programming 511 Assignment 2 (2023 Updated)
Date Submitted:
Moderator’s Comments:
1.1 Write a program that takes user input for two variables, x and y, and performs the
following operations on them:
2.1 Draw a flowchart for the program that will ask the user to enter the amount of a
purchase. The program will then compute the state and county sales tax. Assume the
state sales tax is 5 percent and the county sales tax is 2.5 percent. The program will
then display the amount of the purchase, the state sales tax, the county sales tax, the
total sales tax, and the total of the sale (which is the sum of the amount of purchase
plus the total sales tax). (20)
2.2 Write a Python function to check whether a string is pangram or not. (Assume the
string passed in does not have any punctuation)
Note : Pangrams are words or sentences containing every letter of the alphabet at
least once.
For example : " The quick brown fox jumps over the lazy dog " (10)
QUESTION 3 (30 MARKS)
3.1 A software company sells a package that retails for $99. Quantity discounts are
given according to the following table:
Write a program that asks the user to enter the number of packages purchased. The
program should then display the amount of the discount (if any) and the total amount
of the purchase after the discount. (15)
3.2 Using nested loops, write a Python program that produces the following output:
(15)
3.3 Write a program that asks the user to enter five test scores. The program should
display a letter grade for each score and the average test score as follows:
END OF ASSIGNMENT