Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 ## Fix the below Syntax/EOL Error 2 print(Hello World') 4 ## Fix the Error with the input statement 5 name = input(Enter A Name

image text in transcribed
image text in transcribed
1 ## Fix the below Syntax/EOL Error 2 print("Hello World') 4 ## Fix the Error with the input statement 5 name = input("Enter A Name" 6 7 ## Fix the Error in the below math statement 8 ## Hint: Divsion by zero raises an error (remove division by 0) 9 zero = 0/0 10 11 ## Fix the Error with the print statment 12 print('The world says hello to, name) 13 14 ## Fix the syntax error below 15 print(name) print(zero) Ty > CSE 102: Algorithmic Thinking and Programming home > 16.4: LAB 3 D Code Debugging zyBooks catalog Help Description Being able to fix errors in your own or others' code is an important aspect of computer programming. This lab will focus on fixing some of the most common errors. This process of finding and correcting errors is known as debugging. Take note of these errors as they are likely to be some of the errors you will encounter in future labs and projects. Objective The code given is supposed to print out "Hello World", a name that the user has input, and the value for 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, etc, 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. An example run of your program is as follows: First the program will prompt for your name, asking 'Enter a name' Then, If the input is: Your Name Then output should be Hello World The world says hello to Your Name Your Name

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

More Books

Students also viewed these Databases questions