Need help converting my pseudocode to python, AND have a flowchart showing everything!The code: Function getScore()    // Prompt the user to enter a test score    Display "Enter a test score as a percentage (0-100): "    Input score    // Return the score entered by the user    Return scoreEnd Function Function getGPAPoint(Integer score)    // Determine GPA point based on the score    If score >= 90 Then        Return 4.0    Else If score >= 80 Then        Return 3.0    Else If score >= 70 Then        Return 2.0    Else If score >= 60 Then        Return 1.0    Else        Return 0.0    End IfEnd Function Function getAverage()    // Initialize variables to store the sum of scores and GPA points    totalScore = 0    totalGPA = 0.0        // Loop to collect 5 test scores    For i = 1 to 5 Do        score = getScore() // Call getScore function to get a test score        totalScore = totalScore + score // Add score to totalScore        gpaPoint = getGPAPoint(score) // Convert the score to GPA point        totalGPA = totalGPA + gpaPoint // Add GPA point to totalGPA    End For        // Calculate average score and average GPA    averageScore = totalScore / 5    averageGPA = totalGPA / 5        // Display the results    Display "Average Score: ", averageScore    Display "Average GPA: ", averageGPAEnd Function Module Main    // Call the getAverage function to calculate and display the results    getAverage()End Module Link from previous:https://www.bartleby.com/questions-and-answers/i-need-help-writing-pseudocode-for-calculating-class-score-average-by-putting-in-5-test-scores-and-s/2a0a2372-1e1a-409d-8b0d-6b5572d6afde

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.1: Assignment Operations
Problem 7E: (Civil eng.) Write an assignment statement to calculate the linear expansion in a steel beam as a...
icon
Related questions
Question

Need help converting my pseudocode to python, AND have a flowchart showing everything!
The code:

Function getScore()
    // Prompt the user to enter a test score
    Display "Enter a test score as a percentage (0-100): "
    Input score
    // Return the score entered by the user
    Return score
End Function

Function getGPAPoint(Integer score)
    // Determine GPA point based on the score
    If score >= 90 Then
        Return 4.0
    Else If score >= 80 Then
        Return 3.0
    Else If score >= 70 Then
        Return 2.0
    Else If score >= 60 Then
        Return 1.0
    Else
        Return 0.0
    End If
End Function

Function getAverage()
    // Initialize variables to store the sum of scores and GPA points
    totalScore = 0
    totalGPA = 0.0
    
    // Loop to collect 5 test scores
    For i = 1 to 5 Do
        score = getScore() // Call getScore function to get a test score
        totalScore = totalScore + score // Add score to totalScore
        gpaPoint = getGPAPoint(score) // Convert the score to GPA point
        totalGPA = totalGPA + gpaPoint // Add GPA point to totalGPA
    End For
    
    // Calculate average score and average GPA
    averageScore = totalScore / 5
    averageGPA = totalGPA / 5
    
    // Display the results
    Display "Average Score: ", averageScore
    Display "Average GPA: ", averageGPA
End Function

Module Main
    // Call the getAverage function to calculate and display the results
    getAverage()
End Module



Link from previous:
https://www.bartleby.com/questions-and-answers/i-need-help-writing-pseudocode-for-calculating-class-score-average-by-putting-in-5-test-scores-and-s/2a0a2372-1e1a-409d-8b0d-6b5572d6afde 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning