<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Errors and Exceptions Homework -
Problem 1
Handle the exception thrown by the code below by using try and except blocks.
Step1:  Problem 2
Handle the exception thrown by the code below by using try and except blocks. Then use a finally block to print 'All Done.'
Step2:  Problem 3
Write a function that asks for an integer and prints the square of it. Use a while loop with a try,except, else block to account for incorrect inputs.
<ASSISTANT_TASK:>
Python Code:
for i in ['a','b','c']:
    try: 
        result = i**2
    except TypeError:
        print("Type error attempting to run on {i}".format(i=i))
    else:
        print result
Explanation: Errors and Exceptions Homework -
Problem 1
Handle the exception thrown by the code below by using try and except blocks.
End of explanation
x = 5
y = 0
try:
    z = x/y
except ZeroDivisionError:
    print("Cannot divide by zero")
finally:
    print 'all done'
Explanation: Problem 2
Handle the exception thrown by the code below by using try and except blocks. Then use a finally block to print 'All Done.'
End of explanation
def ask():
    while True:
        try:
            input = int(raw_input("Enter an integer: "))
        except:
            print 'Could not make conversion. Try again'
        else:
            print input**2
ask()
Explanation: Problem 3
Write a function that asks for an integer and prints the square of it. Use a while loop with a try,except, else block to account for incorrect inputs.
End of explanation
<END_TASK>