You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,38 +1,38 @@
1
1
# CoderDojo Twin Cities Python Resources
2
-
This GitHub repository is for sharing teaching resources to teach Python. This includes hints on getting your Python environments setup up and extensive lesson plans for serveral enviornments.
2
+
This GitHub repository is for sharing teaching resources to teach Python. This includes hints on getting your Python environments setup up and extensive lesson plans for several environments.
3
3
4
4
5
-
Our mentors have used several different envornments for teaching Python. They each have pros and cons. What our mentors like is getting new students started using a graphical programming environment such as turtle graphics libraries. Here are some of our favorite tools:
5
+
Our mentors have used several different environments for teaching Python. They each have pros and cons. What our mentors like is getting new students started using a graphical programming environment such as turtle graphics libraries. Here are some of our favorite tools:
6
6
7
7
-[**Trinket.io**](http://trinket.io) is an easy-to use, kid friendly web-based turtle graphics for beginners.
8
8
-[**Jupyter Notebooks**](https://jupyter.org/) also have some support for turtle graphics. Jupyter Notebooks can be tricky to setup for the first time, but they are the perfect on-ramp for teaching data literacy.
9
9
-[**Raspberry Pi**](https://www.raspberrypi.org/documentation/usage/python/) - The Raspberry Pi foundation has selected Python as its primary tool for teaching programming. If you have a Raspberry Pi there are many resources for you. Trinket and Jupyter Notebooks will also run on many Raspberry Pi devices.
10
10
-**Robots** Our students love robots. Python is also the preferred language in many robotics courses. Today we teach beginning robotics with Scratch and Arduino, but we continue to investigate systems like Raspberry Pi robots that can be programmed with Python. Let us know if you have any low-cost kid friendly ideas. We have tested the JetBot and other robots and we continue to look for solutions.
11
11
12
-
Now lets briefly go into the pros and cons of these systems.
12
+
Now let's briefly go into the pros and cons of these systems.
13
13
14
14
## Learning Python with Trinket
15
15
16
-
We use the [trinket.io](http://trinket.io) web site to teach our introduction to python. Trinket has a nice turtle graphics library which is ideal for fast visual feedback. Because it is a free and a pure web web based environment it meets the criteria for our courses. There is no complex setup and each student can continue to do development when they are at home. The downside of Trinket is it has limited functionality, only supports Python 2.X in the free version and you must have an internet connection to use Trinket. If you need Python 3.X web
16
+
We use the [trinket.io](http://trinket.io) web site to teach our introduction to python. Trinket has a nice turtle graphics library which is ideal for fast visual feedback. Because it is a free and a pure web-based environment it meets the criteria for our courses. There is no complex setup and each student can continue to do development when they are at home. The downside of Trinket is it has limited functionality, only supports Python 2.X in the free version and you must have an internet connection to use Trinket. If you need Python 3.X web
17
17
version you can use the free [repl.id](https://repl.it/) web site.
18
18
19
19
## Learning Python with Jupyter Notebooks
20
-
You can also use Jupyter Notebooks to draw turtle graphics. The notebook will open a new window to draw your turtle graphis. Getting Jupyter Notebooks is a bit tricky to setup on many PCs. However, once it is setup it offers tens of thousands of sample programs to learn python coding. Jupyter Notebooks are also the preferred tool by many data science professionals.
20
+
You can also use Jupyter Notebooks to draw turtle graphics. The notebook will open a new window to draw your turtle graphics. Getting Jupyter Notebooks is a bit tricky to setup on many PCs. However, once it is setup it offers tens of thousands of sample programs to learn python coding. Jupyter Notebooks are also the preferred tool by many data science professionals.
21
21
An example of a Jupyter Notebook that uses turtle graphs is [here](jupyter/draw-figure.ipynb)
22
22
23
23
## Learning Python with Raspberry Pi
24
-
If you have a Rasperry Pi there are many great ways to learn Python. One of first things is to try out one of the Python development environments for the Raspberry Pi.
24
+
If you have a Raspberry Pi there are many great ways to learn Python. One of first things is to try out one of the Python development environments for the Raspberry Pi.
25
25
26
26
## Learning Python with Robots
27
-
Right now we are continuing to try to find the right combination of easy-of-use and low-cost robots to teach python. If you hear of any good tools, please let us know.
27
+
Right now, we are continuing to try to find the right combination of easy-of-use and low-cost robots to teach python. If you hear of any good tools, please let us know.
28
28
29
29
## Target Audience
30
30
Learning Python is ideal for students that have good keyboarding skills. If students have difficulty with doing functions like copy and pasting text we suggest they start with a block-programming language like Scratch.
31
31
32
32
## List of Concepts
33
33
Here are some of the concepts we will be learning in this course. If you are already familiar with these concepts you can skip over some of the labs.
34
34
35
-
-**importing libraries** We need to tell Pyhton what functions we want to use. We will use the import function to tell Python which functions we need to use in our programs.
35
+
-**importing libraries** We need to tell Python what functions we want to use. We will use the import function to tell Python which functions we need to use in our programs.
36
36
-**drawing** Turtle graphs has a set of drawing functions. We will learn to use these to draw patterns on the screen.
37
37
-**square walk** - teach your turtle to walk in a square and draw figures.
38
38
-**variables** Variables make our programs easier to read and easier to understand.
@@ -41,7 +41,7 @@ Here are some of the concepts we will be learning in this course. If you are al
41
41
-**functions** Functions allow us to break large programs into chunks that we can give names and can call over and over.
42
42
-**function parameters** Functions can also take parameters to change the behavior of a function.
43
43
-**random numbers** Random number functions allow our programs to have the computer select new random number between a range of numbers.
44
-
-**lists** Lists alow us to create collections of names.
44
+
-**lists** Lists allow us to create collections of names.
45
45
-**inputs** Inputs allow us to prompt the user for values.
46
46
-**recursion** Recursion allows us to have programs call themselves to create repeating patterns.
47
47
-**modules** Once you have a group of related functions you can put them all together into a module. This makes it easier for others to reuse your programs.
Copy file name to clipboardExpand all lines: docs/intermediate/20-installing-local-python.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,7 @@
3
3
The next few labs are labs that must be run on your local computer because the will interact with the local operating system and local file system. You will not be able to use Trinket to run these programs.
Copy file name to clipboardExpand all lines: docs/trinket/00-introduction.md
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -17,16 +17,20 @@ The map above is a visual guide to our Introduction to Python course. Students
17
17
For students that are new to programming, here are some sample programs (what we call learning labs) that you can try. You can learn by reading the sample programs, going to the Trinkit.io site and changing some values in the code. Each of the labs has experiments at the end you can do to extend to see if you have mastered the concepts before you go on to the next lab.
18
18
19
19
1.[Trinket Account](./01a-trinket-account.md) - introduction to the Turtle Graphs library with a list of drawing functions
20
-
1.[Turtle graphics](./01a-turtle-graphics.md) - introduction to the Turtle Graphs library with a list of drawing functions
21
-
2.[Simple square](./02-simple-square.md) - draw a square by moving and turning right four times
20
+
2.[Turtle graphics](./01b-turtle-graphics.md) - introduction to the Turtle Graphs library with a list of drawing functions
21
+
3.[Simple square](./02-simple-square.md) - draw a square by moving and turning right four times
22
22
4.[Variables](./03-variables.md) - add variables for the move edge distance and angle
23
23
5.[Loops](./04-loops.md) - add a loop to make our code smaller
24
24
6.[Conditionals](./05-conditionals.md) - add an if statement to change the color
25
25
7.[Functions](./06-functions.md) - create a shape function
26
26
8.[Function parameters](./07-function-parameters.md) - add parameters to our function
27
27
9.[Random](./08-random.md) - generate random numbers that are used do drive the turtle
28
-
9.[Lists](./08-list.md) - store a list of colors
29
-
10.[Inputs](./11-input.md) - get some input from the user
30
-
11.[Recursion](./12-recursion.md) - create a function that calls itself to draw a tree
31
-
28
+
10.[Lists](./08-list.md) - store a list of colors
29
+
11.[Inputs](./11-input.md) - get some input from the user
30
+
12.[Recursion](./12-recursion.md) - create a function that calls itself to draw a tree
31
+
13.[Shapes](./13-shape-module.md) - creating a separate module to draw shapes
32
+
14.[Color picker](./14-color-picker.md) - picking different colors
33
+
15.[Sine wave](./15-sine-wave.md) - creating a sine wave
34
+
16.[Changing Background](./16-changing-background.md) - changing background image and capturing keyboard
You can click on this link and then press the Run button. You should see the python code on the left side and the drawing on the right side of your screen.
30
30
31
-
## Explaination
31
+
## Explanation
32
32
The first three lines will be the same for all our programs. They import the turtle library into our program, create a new turtle object and then assign the turtle a shape icon. Although almost all the turtle libraries work this way, there are some minor differences you will see in future examples.
33
33
34
-
## Reorinenting your turtle
35
-
Note that at the start, the turtle is facing to the right. After the last instruction, it is also facing to the right. This is a common best practice so that the turtle gets reoriented after some drawing function. If you remove the last right(90) function and run the program again you will see the turtle ends up facing upward. But if you rerun the progam you will still get the same square because the orientation of the turtle is not stored between runs.
34
+
## Reorienting your turtle
35
+
Note that at the start, the turtle is facing to the right. After the last instruction, it is also facing to the right. This is a common best practice so that the turtle gets reoriented after some drawing function. If you remove the last right(90) function and run the program again you will see the turtle ends up facing upward. But if you rerun the program you will still get the same square because the orientation of the turtle is not stored between runs.
36
36
37
37
## Experiments
38
38
Can you change the distance and angle the turtle moves? What happens when you change the numbers for the forward and right functions? Can you go left as well as right?
0 commit comments