def fibonacci(b): if b == 0: return 0 elif b == 1: return 1 else : return fibonacci(b-1) + fibonacci(b-2)
def fibonacci(x):if x == 0:- def fibonacci(b):
- if b == 0:
- return 0
elif x == 1:- elif b == 1:
- return 1
- else :
return fibonacci(x-1) + fibonacci(x-2)- return fibonacci(b-1) + fibonacci(b-2)
Bugs
write a divide program
def div(num1, num2):
return(num1 / num2)
test.assert_equals(div(50, 10), 5)
test.assert_equals(div(10, 5), 2)
test.assert_equals(div(100, 10), 10)
test.assert_equals(div(64, 8), 8)
test.assert_equals(div(30, 6), 5)
test.assert_equals(div(55, 5), 11)
test.assert_equals(div(144, 12), 12)
test.assert_equals(div(66, 6), 11)
test.assert_equals(div(132, 12), 11)
test.assert_equals(div(1, 1), 1)
Numbers
Data Types
create a program that changes kilograms to grams
def kilotograms(kilograms):
pass