Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code Example 5-2 1. # This application displays a student's score after a 5-point curve 2. 3. def display_info(fname, lname, score): 4. print(Hello, , fname,

Code Example 5-2 1. # This application displays a student's score after a 5-point curve 2. 3. def display_info(fname, lname, score): 4. print("Hello, ", fname, " ", Lname) 5. print("Your score on this exam is ", score) 6. score = score + 5 7. 8. def main(): 9. first = input("first name: ") 10. last = input("last name: ") 11. grade = input("exam score: ") 12. display_info(first, last, score) 13. 14. # if started as the main module, call the main function 15. if __name__ == "__main__": 16. main() Refer to Code Example 5-2: What is the first error in the display_info() function? Group of answer choices The print statement on line 4 should use an f-string instead of commas You cannot add a number to itself, as on line 6 The variable Lname on line 4 does not exist The arguments on line 3 should be first and last, not fname and lname

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions

Question

Did anyone get charged for the The "FBI Virus" Scam

Answered: 1 week ago