CO3519 Artificial Intelligence
CO3519 Lecture 1 - Introduction To Artificial Intelligence
Task 1 - Warm Up Exercise
β’ Please follow this link where you will find PYTHON EXERCISE under PYTHON EXAMPLES. This exercise will help you get prepare for the labβs sessions, Tasks, assignments, etc.
β’ In this exercise, you will get start from very basic and easy questions and you must choose the right answer from the choices. (For instance, Look figure at below figure.) β’ You will also see the correct answers for these questions. (For instance, look at Figure 2.)
Task 2 - Start with Google Colab
Please follow this link and go through these pages while working.
β’ Page 3 to 7
β’ Page 11 to 13
β’ Page 23 to 24
β’ Page 36
Mistake Made During Completion
Pages misunderstood for the section numbers. Having checked the content on the pages suggested, covered all basis.
Task 3 - Python with NumPy and important DataTypes
Please follow this [link] as follows:
β’ Introduction (skip)
β’ Basics of Python (skip)
β’ NumPy - Arrays, DataTypes, Array Math and Matplotlib
Accessing Google Colab
- Create NEW PYTHON 3 NOTEBOOK
- The notebook interface is similar to the one provided by Jupyter
Runtime
The time difference between the two outputs is now exactly 5 seconds.
Quote
Jupyter includes shortcuts for many common system operations
message = 'A Great Example!'
greeting = !echo -e '$message'
greeting
---OUTPUT---
['A Great Example!']
Note
/content/drive/My Drive/app/
%ldir
---OUTPUT---
drwxr-xr-x 3 root 4096 Jun 20 10:05 drive/
drwxr-xr-x 1 root 4096 May 31 16:17 sample_data/
Right clicking on a code cell allows a form to be added allowing for easy user input at runtime.
NumPy is the core library for scientific computing in Python.
A NumPy array is basically a table (or grid) of numbers that are all the same data type (for example, all integers or all floats).
x = np.array([1,2]) # Let NumPy Choose DataType
y = np.array([1.0, 1.0]) # Let NumPy Choose DataType
z = np.array([1, 2], dtype.np.int64) # Forcing Array To 64-bit Integer DataType
print(x.dtype, y.dtype, z.dtype)
# Compute the x and y coordinates for points on a sign curve
x = np.arange(0, 3 * np.pi, 0.1)
y = np.sin(x)
# Plot points
plt.plot(x,y)