Programming with Python
Ahakoa he iti he pounamu
Although it is small, it is greenstone - This is a humble way to deliver a small gift.
In the digital age that we are in now, the ability to communicate with computers is essential as our lives depend on them. Many new jobs will depend on programming, and existing jobs that will require coding skills will grow exponentially because most services and products are being digitised. It means they will work in a virtual environment, and without coding skills, it would be hard to make them work successfully, so how important will it be in the future?
Algorithms for Programming
Task 1
Pick one of these to do as a refresher
Learn Python
Task 2 - Learn Python through Grok Academy
Go to Grok and Login with your school email.
You have all been added to your class and you will see you have been allocated the Beginners Python Course.
Complete the 10 modules.
Visual Studio Code
Visual Studio Code (VS Code) is a free, open-source code editor made by Microsoft. It's popular because it supports many programming languages, including Python, and is easy to use. VS Code is highly customizable, has strong debugging tools, and includes an integrated terminal. For Python developers, it offers helpful features like code suggestions, error checking, and easy integration with version control systems. This makes it a great tool for both beginners and experienced programmers.
Open Visual Studio Code on your computer
Create a new file by pressing File > New File
Type "helloWorld.py" into the box and press Enter and save it in your H: Drive
Type print("Hello World") into the program. Then run it by pressing the arrow in the top right corner.
You may need to allow the program to run if you get an error message by typing R into the Terminal at the bottom of the screen and running the program again!
Now have a go at solving a few Code WoF problems using Visual Studio Code to write the code and copying it across. A few common mistakes:
Computers don't care about saying nice things. make sure your input() does not contain a string. An example of what not to do would be input("Please write a number" ), just leave your input() blank.
~ PROGRAMMING ASSESSMENT ~
Competition!
We've set up a competition that is open to all students at Burnside High School.
It's hosted online, so you'll need to create an account and log in to the application. Instructions are shown in the document to the right.
Read the problem and then write tour solution in Python in Visual Studio Code. You'll need to submit the python file to the sompetition server and it'll tell you if it is successful.
Basically, you'll be taking input, processing the input and providing output through print statement(s).
Good luck!
Extension
~ Challenge Yourself with more Python Programming Options ~
Practice your problem decomposition and puzzle solving skills in Python in the excellent site: CodeWOF.
CodeWOF goes from beginner to intermediate and is great programming practice. It has cool short puzzles to solve and immediate feedback.This short video will help you get started using CodeWOF.
From the basics of how it works and what the problem types are to more advanced topics around string slicing, functions and dictionaries.
Watch this to get you started on one of the best practice resources for Python Programmers in the world.
This is a cool way to learn programming that teaches you Python programming through setting challenges inside a game.
Code Combat is free (up to a point) so you can work through at home too! Use your school email to create an account.
This website is used as a recruitment tool for Google and Microsoft! Tackle some real brain-bending problems in Python and maybe even get on the global leaderboards.
The ultimate challenge for programmers.
The Home of competitive programming. Use the "Train" section to try out some of the questions from past NZ and international competitions.
~ Write your own python program ~
More Python Help
Getting started with Python
W3Schools is one of the best places to go for an in-depth tutorial and reference for programming in Python.
Learning to program in Python is hard and you are going to have to persevere.
Read the tutorials, try it in in the "Try it yourself" boxes and experiment with each one to help you get a better understanding of each topic.
Scratch to Python
- reference
Maybe you already know how to program in Scratch and want to know what it looks like in Python?
This document goes through some standard small Scratch programs and shows what the same program looks like in Python.
It also contains some explanations about the Python language and the weird things it needs like "tabs" that define code blocks.
Learn Python From Scratch
This is an easy to watch and follow along tutorial to learn Python.
Mosh takes you from complete beginner to expert in an hour.
Well worth watching if you have never programmed before. But it is an hour long!!
If you are struggling with understanding programming watch this for homework!!
More Python Resources
45 Fun (and Unique) Python Project Ideas for Easy Learning
https://www.dataquest.io/blog/python-projects-for-beginners/
NZ CURRICULUM
Digital Technologies | Progress Outcomes
COMPUTATIONAL THINKING FOR DIGITAL TECHNOLOGIES
The progress outcomes describe the significant learning steps that students take as they develop their expertise in computational thinking for digital technologies.
At the end of this topic students will have had the opportunity to cover;
understand that there can be more than one algorithm for the same problem PO3
decompose problems into step-by-step instructions to create algorithms for computer programs PO3
use logical thinking to predict the behaviour of the programs PO3
develop and debug simple programs that use inputs, outputs, sequence, and iteration PO3
students decompose problems to create simple algorithms using the three building blocks of programming: sequence, selection, and iteration PO4
implement these algorithms by creating programs that use inputs, outputs, sequence, basic selection using comparative operators, and iteration PO4
debug simple algorithms and programs by identifying when things go wrong with their instructions and correcting them PO4
be able to explain why things went wrong and how they fixed them PO4
evaluate the efficiency of algorithms PO4
recognise that computers need to search and sort large amounts of data PO4
They also evaluate user interfaces in relation to their efficiency and usability P04
students independently decompose problems into algorithms. They use these algorithms to create programs with: inputs, outputs, sequence, selection (using: comparative and logical operators, variables of different data types), iteration. P05
determine when to use different types of control structures. They document their programs, using an organised approach for testing and debugging P05
develop programs considering human-computer interaction (HCI) heuristics P05