Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective The code given is supposed to print out the following in order The text Hello World . A greeting that includes the first and

image text in transcribed
Objective The code given is supposed to print out the following in order The text "Hello World . A greeting that includes the first and last names the user has input The first and last names the user has input The value 25.0 However , the code as given has several errors that prevent it from running. You are to fix the errors within the code But wait Even if you immediately see how to fix the errors, don't until you run the program and observe what the interpreter is or isn't telling you for each kind of error. Likewise if you don't see the problem immediately, do not just ask your TA what it is they have been instructed not to just give you the answer. However, they may give you hints if you have struggled for a long time. It is recommended that you run the program as is first then fix one error run it again, fix the next error, eto, fixing only one error at a time while observing the behavior at each step. The purpose of this lab is to give you experience in what certain kinds of errors look like before you know there are errors. If you immediately fix the errors, get 100%, and move on, or if you ask someone else for the correction, get 100% and move on you have not accomplished the goal of this lab. Each error is preceded by a comment (like ## Fix the below error) describing the error and how these errors should be fixed. First the program will prompt for your name, asking "Enter a First Name" and "Enter a Last Name If the input is Sparty Spartan Then output should be Hello World The world says hello to Sparty Spartan Sparty Spartan 25.0 301826 1742850 0/30 LAB ACTIVITY 2.11.1: LAB 2D: Code Debugging main.py Load default template 4 Fix the Error with the input statenent(s) 5 name - input("Enter A First Name> 6 input("Enter A Last None") 7 firstnone - input("Enter a First None") #lastrone - input("Enter o Last None 9 * Fox the Crror in the below statements 10 Hint: Division by zero is undefined in mathenatics and causes an error on computers 11. You want to leave line 13 alone - think about how to make that division come out to an average of 25.0 12 count - 1 13 - 25 14 average - sun / count 15 16 Fix the Error so the result will be printing the message followed by the first one 17 w followed by the lastnome. For example, it should print something like "The world say hello to Jane Seith 18 print("The world says hello to', first one, lostrane) 19 20 # Fix the errorts) below so the firstrane and lastnone are printed on one line followed by the average on one line 21 orint firstrom lastnane Caverde

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_2

Step: 3

blur-text-image_3

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

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions

Question

State the basic counting rule (BCR).

Answered: 1 week ago