Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Each line that contains an error, add a hash ( # ) at the beginning of each line that contains an error to mark it

Each line that contains an error, add a hash (#) at the beginning of each line that contains an error to mark it as a comment and add another comment
above it explaining what the error is, and then another line below that with the corrected code if possible as you did in Ex.1
There may be syntax as well as runtime errors in the code.
#!/usr/bin/env python3
# Palomar College CSIT-175
# Your Name Here
# find the errors in the sample code.
import random
def add(a,b) :
return a+b
def multiply( a, b ):
return a**b
def square( a ):
return a**a
def main():
x=10
y=0
z=xy
print ("Value of z=+z)
print (f"{w}-->{x}-{y}
int_value = int("abc")
print( square(random.getrandom(10)))
print (add (1))
x=(2,3)
print (x)
None =10
print("The value of x is: %d% "abc")
if _=="" :
main()
image text in transcribed

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