-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from marcovicci/main
- Loading branch information
Showing
15 changed files
with
100 additions
and
18 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "1dd0ceae", | ||
"metadata": {}, | ||
"source": [ | ||
"# intro to py5 and python\n", | ||
"\n", | ||
"These tutorials offer a path down a few topics of interest for a complete beginner to Python (and to py5). No external knowledge is assumed, and whenever possible, they have been written specifically so that they can be enjoyed in any order. You might find some of them much more challenging, and some extremely straightforward. \n", | ||
"\n", | ||
"When we're instructing a computer to run code, we cannot use regular human language. Instead, code takes the form of an *algorithm* or a series of algorithms which are handed to the computer. Although the word algorithm has had a lot of complex recent use, at its simplest form, an algorithm is just a set of rules or instructions for a computer to follow. Unlike most humans, if a computer is given unclear instructions, it can't problem-solve its way out of the situation - it will simply stop in its tracks. This means that small errors in the syntax (grammatical structure) of your code will cause many of the problems you run into, and it will get easier as time goes on to anticipate and correct them.\n", | ||
"\n", | ||
"Get familiar with the [py5 reference](/reference/sketch.html) -- this will serve as your glossary for the functions, methods, and data types we discuss here. When you're using the py5 reference pages, you should be aware of the mode and the *syntax* (structure of code) being used, as these may differ from what is used in this tutorial. \n", | ||
"\n", | ||
"Firstly, we'll often be using something called *static mode*, which is a simple way to get started with py5 (especially if you're using [py5bot](/tutorials/misc_introduction_to_py5bot.html)). This mode is for making sketches which don't move or animate; they are *static* in terms of their state or motion. Later, animated sketches and sketches with user interaction will split code up into blocks labeled with functions like `setup()` and `draw()`, which facilitates animation. \n", | ||
"\n", | ||
"You'll also notice that the reference seems to be starting a lot of functions and arguments with `py5.` because these functions are built into py5 itself, rather than being a feature of regular Python code. However, if you're using the py5bot or py5 kernels, or coding using an addon like the py5 mode for the Thonny IDE, you may be able to completely omit these references to py5." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3.10.5 64-bit", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.5" | ||
}, | ||
"vscode": { | ||
"interpreter": { | ||
"hash": "e593ac106456af50ce7af38f9671c411b49d6cd90f9b885e167f0f594e09038c" | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,7 +141,7 @@ | |
"y = 30\n", | ||
"w = 20\n", | ||
"h = w\n", | ||
"<img srect(x,y, w,h)" | ||
"rect(x,y, w,h)" | ||
] | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.