1 COMP212328239123 Input format The program will read numbers from the standard

1 comp212328239123 input format the program will read

This preview shows page 1 - 2 out of 2 pages.

Image of page 1
COMP2123/2823/9123 Input format: The program will read numbers from the standard input terminal (shown as Console when you run your program in the Ed workspace). The program expects one mark per line. The marks will all be integers between 0 and 100 inclusive. The program will stop reading marks when it reaches end-of-file. (To indicate end-of-file in the terminal, press Ctrl+D on a blank line.) We have provided the code in both Java and Python, so that you don’t need to deal with the I/O aspects; our skeleton will do the reading, and provide a list with the marks. In Java, the type of this is List<Integer> , in Python it is a list whose elements are integers. Output format: Your program should print two lines. The first line of output contains the average mark , i.e. the sum of all the marks divided by the number of courses completed, and then rounded down to be an integer; and the second line has the average grade , which is determined from the average mark by the following rules: < 50 FA 50 and < 65 PS 65 and < 75 CR 75 and < 85 DI 85 HD If the input is empty, that is, no marks have been recorded, then the average mark should be 0 and the average grade should be AF.
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Three '18

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors