diff --git a/31 Error Handling/exercise-2.py b/31 Error Handling/exercise-2.py new file mode 100644 index 0000000..a94af34 --- /dev/null +++ b/31 Error Handling/exercise-2.py @@ -0,0 +1,4 @@ +number = 1 +while number < 13: + print("[{0} squared = {1}".format(number, number * number)) + number += 1 \ No newline at end of file diff --git a/31 Error Handling/exercise-3.py b/31 Error Handling/exercise-3.py new file mode 100644 index 0000000..4c7ea95 --- /dev/null +++ b/31 Error Handling/exercise-3.py @@ -0,0 +1,15 @@ +def writeFile(): + """write data to a file""" + try: + myFile = open('new_file.txt', 'w') + myFile.write("Little Bo Peep has lost her sheep") + myFile.write("\n") + myFile.write("And doesn't know where to find them.") + myFile.write("\n") + myFile.close() + except FileNotFoundError: + print("Error: The file could not be created.") + except IOError: + print("Error: There was an issue writing to the file.") + finally: + print("File operation completed.") \ No newline at end of file diff --git a/31 Error Handling/task.png b/31 Error Handling/task.png new file mode 100644 index 0000000..16302a1 Binary files /dev/null and b/31 Error Handling/task.png differ diff --git a/32 Databases/task.png b/32 Databases/task.png new file mode 100644 index 0000000..3fd6df4 Binary files /dev/null and b/32 Databases/task.png differ diff --git a/33 Primary Keys/task.png b/33 Primary Keys/task.png new file mode 100644 index 0000000..80be171 Binary files /dev/null and b/33 Primary Keys/task.png differ diff --git a/34 Data Types/task.png b/34 Data Types/task.png new file mode 100644 index 0000000..e19174d Binary files /dev/null and b/34 Data Types/task.png differ diff --git a/35 QBE Grids/task.png b/35 QBE Grids/task.png new file mode 100644 index 0000000..869641c Binary files /dev/null and b/35 QBE Grids/task.png differ diff --git a/36 Database Questions/task.png b/36 Database Questions/task.png new file mode 100644 index 0000000..6d3cfed Binary files /dev/null and b/36 Database Questions/task.png differ diff --git a/37 Comparison Operators/task.png b/37 Comparison Operators/task.png new file mode 100644 index 0000000..50f6a2d Binary files /dev/null and b/37 Comparison Operators/task.png differ diff --git a/38 Database Queries/task-2.png b/38 Database Queries/task-2.png new file mode 100644 index 0000000..910b478 Binary files /dev/null and b/38 Database Queries/task-2.png differ diff --git a/38 Database Queries/task.png b/38 Database Queries/task.png new file mode 100644 index 0000000..17fcdf2 Binary files /dev/null and b/38 Database Queries/task.png differ diff --git a/39 Multiple table search/task.png b/39 Multiple table search/task.png new file mode 100644 index 0000000..f889269 Binary files /dev/null and b/39 Multiple table search/task.png differ