Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermediate python #27

Closed
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# project setup
.idea
venv

# jupyter
.ipynb_checkpoints

# packaging
simplepackage.egg-info
__pycache__
build
dist
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Python environment with a requirements.txt

[![Binder](http://mybinder.org/badge_logo.svg)](http://mybinder.org/v2/gh/binder-examples/requirements/HEAD)
[![Binder](http://mybinder.org/badge_logo.svg)](http://mybinder.org/v2/gh/carlvitzthum/requirements/HEAD)

A Binder-compatible repo with a `requirements.txt` file.

Access this Binder at the following URL
Access this Binder at the following URL:

http://mybinder.org/v2/gh/carlvitzthum/requirements/HEAD

You can also access certain branches by prepending with URL with the branch instead of HEAD:

http://mybinder.org/v2/gh/carlvitzthum/requirements/intermediate_python

http://mybinder.org/v2/gh/binder-examples/requirements/HEAD

## Notes
The `requirements.txt` file should list all Python libraries that your notebooks
Expand Down
126 changes: 126 additions & 0 deletions coding_club_2018/programming_week_2.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Programming Club Week 2\n",
"#### Introduction to Python"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# first, some basic stuff\n",
"# addition, subtraction, comments, variables"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# do some set up stuff\n",
"from mobilechelonian import Turtle\n",
"# this creates a turtle! His name is \"turt\".\n",
"turt = Turtle()\n",
"# try changing the Grid On/Off\n",
"### LET'S PUT OUR MAIN CODE HERE ###"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"turt.forward(100)\n",
"turt.right(90)\n",
"turt.forward(100)\n",
"turt.right(90)\n",
"turt.forward(100)\n",
"turt.right(90)\n",
"turt.forward(100)\n",
"turt.right(90)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def square_one(turt):\n",
" turt.forward(100)\n",
" turt.right(90)\n",
" turt.forward(100)\n",
" turt.right(90)\n",
" turt.forward(100)\n",
" turt.right(90)\n",
" turt.forward(100)\n",
" turt.right(90)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def square_two(turt):\n",
" for i in range(4):\n",
" turt.forward(100)\n",
" turt.right(90)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Some other stuff to play with:\n",
"turt = Turtle()\n",
"turt.speed(5)\n",
"turt.penup()\n",
"turt.pendown()\n",
"turt.circle(100)\n",
"turt.pencolor('red')\n",
"turt.home()\n",
"turt.circle(50)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading