Python Programming: An Introduction to Computer Science, 3rd Ed.
Python Programming: An Introduction to Computer Science, 3rd Ed.
3rd Edition
ISBN: 9781590282755
Author: John Zelle
Publisher: Franklin, Beedle & Associates
bartleby

Concept explainers

Question
Book Icon
Chapter 7, Problem 2PE
Program Plan Intro

Print a grade for quiz score

Program plan:

  • In the function  “main() ”,
    • Get the input from the user.
    • Check the condition, “y” is equal to “5” using “if” statement,
      • Print a character “A”.
    • Check the condition, “y” is equal to “4” using “if” statement,
      • Print a character “B”.
    • Check the condition, “y” is equal to “3” using “if” statement,
      • Print a character “C”.
    • Check the condition, “y” is equal to “2” using “if” statement,
      • Print a character “D”.
    • Check the condition, “y” is equal to “1” using “if” statement,
      • Print a character “F”.
    • Check the condition, “y” is equal to “0” using “if” statement,
      • Print a character “F”.
    • Otherwise, Print the string “Please enter the quiz score between 0 and 5”.
  • Call the function “main()”.

Blurred answer
Students have asked these similar questions
If integer x is divisible by 3, can you prove that ceil(x/2) + floor(x/6) = floor(x/2) + ceil(x/6)
Draw the NFA for this
What are three examples each of closed-ended, open-ended, and range-of-response questions? thank you
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT