Let's do a quick round and ask everyone how they ended up here.
Poll Questions for the attendees:
-
"Do you have a programming background?"
"A: Not really but I know how to google."
"B: I know what variables, functions and loops are."
"C: I can already make working programs in another language."
"D: I can already code in Python."
-
"Do you have experience using github?"
This is the passive part. I will give a demonstration for which you can find the resources here: https://github.com/DriesDD/Python-watch
Make sure to install Python3 and not Python2. (The mac/linux package called 'Python' is actually Python 2)
https://www.python.org/downloads/
To test if python is installed:
Open the terminal / command prompt and run the python3
command. You should see the version number and details.
You are now in Python's interactive mode. Try a command like print("hello BeCode")
or 'Python goes b' + 'r'*10
or a mathematical calculation. You can do everything python can do from your terminal, even using modules!
To exit, use CTRL-Z or run exit()
.
Now it's time to create a python file!
Python files end in .py
.
They can be run in the terminal / command prompt with python3 example.py
.
There are some examples in the example folder, with exercises in the code comments.
Many modules come preinstalled with python, but if the needed module is not installed you can install it using pip: https://helpdeskgeek.com/how-to/how-to-install-python-pip/
You can also search for some popular modules and think of how they could be used: https://catswhocode.com/python-modules-list/
If you don't have an IDE (Integrated development environment, a coding application) I would recommend downloading VSCode which is free and works on every platform. It has many extensions, install the Python extension.
Choose an exercise from the folder or make up your own. The most important thing is to produce some unique code that is yours.
We ask some people to show off what they made.