Professional Documents
Culture Documents
Assignment #5 [2%]
Chapter 6: More about Loops and Decisions
Alberta Einstein teaches a business class at Podunk University. To evaluate the students in this class,
she has given four tests.
It is now the end of the semester and Alberta asks you to Draw flowchart and write a program that inputs
each student’s test scores and outputs the average score for each student and the overall
class average.
(Hint: The outer loop should allow for Ms. Einstein to input all the students, one by one, and the inner
loop should accept the three exam scores and compute the average for each student.)
Question 2: programming
Write a program that will simulate the process of dealing cards from a 52-card deck by generating
1,000 random integers in the range 1–52.
Assume that numbers 1–13 represent clubs, 14–26 represent diamonds, 27–39 represent hearts, and
40–52 represent spades. Display the number of times each suit occurred in the 1,000 “deals.”