Skip to content

Commit d10f140

Browse files
committed
exercise 2 complete
1 parent 831dda0 commit d10f140

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def double(number):
2+
return number * 3
3+
4+
print(double(10))
5+
6+
# Read the above code and write down what the bug is. How would you fix it?
7+
8+
# Potential bug: code says double and it is multiplying by 3
9+
# We can't be sure this is a bug without knowing more information about intent of the developer or requirement of the user.
10+
11+
# Assuming a bug; it could be fixed by changing the name of the function to triple, or the integer to 2.

0 commit comments

Comments
 (0)