Question: Problem 1 : Testing and Debugging Points Possible: 1 0 This problem will allow you to demonstrate your testing and debugging skills. Instructions: For this

Problem 1: Testing and Debugging
Points Possible: 10
This problem will allow you to demonstrate your testing and debugging skills.
Instructions:
For this problem, you are given a piece of code that has several bugs. Your task is to identify and correct these bugs to make the program work as intended.
The code is supposed to calculate the product and quotient of two numbers put in by the user. Here is the buggy code:
Enter that code into your IDE and run it to test and then debug it. You will find several bugs.
When you find a bug, fix it and leave a comment for each bug you squash and explain what was wrong with it. State whether it is a syntax, runtime, or logic error. Place each comment on its own line directly above the line that had the bug in it.
After debugging, the code should:
Ask the user to input two numbers, represented by num1 and num2.
Print the product of the two numbers.
Print the quotient of the two numbers if the division is a legal operation. Otherwise, it should print a message saying that you cannot divide by 0.
Below are some test cases that your program output should match. But your code should work with any combination of numbers put in by the user.
Submission: Save your programs source code using the following naming convention:
PS3_P1__.py
Submit the file as per the instructions under the 'Submission' section in the General Instructions for Problem Sets document. You will submit this file and all other problem set solution files at the same time.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!