Skip to content

DriesDD/python-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

1. Introduction

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?"

2. Python installation, syntax and examples.

This is the passive part. I will give a demonstration for which you can find the resources here: https://github.com/DriesDD/Python-watch

3. Getting started: installation of python.

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().

4. Coding!

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.

Kung Fury is a masterpiece of modern cinema.

5. Debrief.

We ask some people to show off what they made.

About

A hands-on introduction to python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published