<jupyter_start><jupyter_text>Contents 1) Reversing a string  2) Fizz Buzz  1) Reversing a string<jupyter_code>string = 'Test string to reverse'

def reverse(str1):
    
    list1 = []
    list2 = []
    
    for i in str1:
        list1.append(i)
    for i in reversed(list1):
        list2.append(i)
    return ''.join(list2)
        
reverse(string)        
        
string2 = 'Test string two'
string2[::-1]<jupyter_output><empty_output><jupyter_text>2) Fizz Buzz<jupyter_code>list1 = []

for i in range(1,51):
    if i%3 == 0 and i%5 == 0:
        list1.append('FizzBuzz')
    if i%3 == 0:
        list1.append('Fizz')
    if i%5 == 0:
        list1.append('Buzz')
    else:
        list1.append(i)

print(list1)<jupyter_output>[1, 2, 'Fizz', 3, 4, 'Buzz', 'Fizz', 6, 7, 8, 'Fizz', 9, 'Buzz', 11, 'Fizz', 12, 13, 14, 'FizzBuzz', 'Fizz', 'Buzz', 16, 17, 'Fizz', 18, 19, 'Buzz', 'Fizz', 21, 22, 23, 'Fizz', 24, 'Buzz', 26, 'Fizz', 27, 28, 29, 'FizzBuzz', 'Fizz', 'Buzz', 31, 32, 'Fizz', 33, 34, 'Buzz', 'Fizz', 36, 37, 38, 'Fizz', 39, 'Buzz', 41, 'Fizz', 42, 43, 44, 'FizzBuzz', 'Fizz', 'Buzz', 46, 47, 'Fizz', 48, 49, 'Buzz']
StarcoderdataJupyterStructuredCleanDedup