rewrite question 3
This commit is contained in:
@@ -94,14 +94,23 @@ if __name__ == "__main__":
|
||||
|
||||
# question 3:
|
||||
|
||||
def calculate_square(x):
|
||||
square = x ** 2
|
||||
return square
|
||||
|
||||
def calculate_cube(x):
|
||||
cube = x ** 3
|
||||
return cube
|
||||
|
||||
def main():
|
||||
x = 5
|
||||
y = 2
|
||||
breakpoint()
|
||||
result = x + y # Line of interest
|
||||
|
||||
print(result)
|
||||
number = 5
|
||||
breakpoint() # Set breakpoint here
|
||||
square_result = calculate_square(number)
|
||||
cube_result = calculate_cube(number)
|
||||
print("Square:", square_result)
|
||||
print("Cube:", cube_result)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user