Ad
Code
Diff
  • 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)
Code
Diff
  • class add:
        def __new__(self, x, y): return x + y
            
    • class add:
    • def __new__(self, x, y):
    • return x + y
    • def __new__(self, x, y): return x + y
Numbers
Data Types

create a program that changes kilograms to grams

def kilotograms(kilograms):
    pass