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