# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

for i in ['a','b','c']:

    try:
        print(i**2)
    except OSError:
        print('You have an type Error. Can\'t mix int and string')
        continue
    except:
        print('Just trying out')


def ask():
    while True:
        try:
            x = int(input('Please provide an integer to sqaure it: '))
            result = x**2
            print(result)
            break
        except ValueError:
            print('You need to provide an integer')


ask()

StarcoderdataJupyterScriptsDedupFiltered