Introduction to Programmng in Python

Slides:



Advertisements
Similar presentations
Computer and Programming
Advertisements

PIIT Computer Science Summer Camp - Alice July 10, 2012 Brenda Parker Computer Science Department MTSU.
An Introduction to Textual Programming
 We are going to learn about programming in general…How to think logically and problem solve. The programming language we will use is Python. This is.
Bug Session Four. Session description Objectives Session activities summary Resources Prior knowledge of sequencing instructions using Bug Bug website.
By the end of this session you should be able to...
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
Conditions. Objectives  Understanding what altering the flow of control does on programs and being able to apply thee to design code  Look at why indentation.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Chapter 3: Branching and Program Flow CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp.
1 Printing in Python Every program needs to do some output This is usually to the screen (shell window) Later we’ll see graphics windows and external files.
Algorithms and Pseudocode
Getting Started With Python Brendan Routledge
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
Michael Emerton
GCSE COMPUTER SCIENCE Practical Programming using Python Lesson 4 - Selection.
Introduction to python programming
GCSE COMPUTER SCIENCE Practical Programming using Python
Welcome to Scottish Improvement Skills
CST 1101 Problem Solving Using Computers
GCSE COMPUTER SCIENCE Practical Programming using Python
YEAR 12 COMPUTER SCIENCE.
Component 1.6.
Software Development.
Topic: Introduction to Computing Science and Programming + Algorithm
Whatcha doin'? Aims: To start using Python. To understand loops.
3.1 Fundamentals of algorithms
Topic: Programming Languages and their Evolution + Intro to Scratch
Repetition Structures
FLOWCHARTS Part 1.
Week of 12/12/16 Test Review.
Topics Introduction to Repetition Structures
Understand Problem Solving Tools to Design Programming Solutions
Teaching design techniques to design efficient solutions to problems
Algorithm and Ambiguity
Teaching Computing to KS3
Learning to Program in Python
Learning to Program in Python
Writing Functions( ) (Part 5)
Teaching Listening Based on Active Learning.
Learning to Program in Python
Computer Science and an introduction to Pascal
Learning to Program in Python
Learning to Program in Python
Creativity in Algorithms
Today’s lesson – Python next steps
Learning to Program in Python
Lesson 2 Programming constructs – Algorithms – Scratch – Variables Intro.
Introduction to pseudocode
Pick a number, any number …
Lesson Objectives Aims You should be able to:
Computational Thinking in Learning
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
UNIT 3 CHAPTER 1 LESSON 4 Using Simple Commands.
Story time Task 5 Computer Programming Gray , Calibri 24
Topic 1: Problem Solving
Computational Thinking for KS3
Coding Concepts (Basics)
Algorithm and Ambiguity
PYTHON: BUILDING BLOCKS Sequencing & Selection
Welcome to AP Computer Science A!
COMPUTATIONAL THINKING COMPUTATIONAL THINKING IN PROGRAMMING
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Place 3-digit numbers on a line
Introduction to Python
WEEK 8 COURSE PROJECT PRESENTATION NAME: ALEXANDER WEISS CLASS: CIS115.
Pinch Points: Planned Interventions in Science lessons
Year 8 Computer Science Digital Portfolio
Presentation transcript:

Introduction to Programmng in Python Computing At School Introduction to Programmng in Python

Objectives of the day To introduce some basic programming principles using the Python programming language To understand how and why variables are used To be able to understand and write a simple if statement To be able to understand and write a simple while loop To reflect on ways of teaching programming in the classroom To identify further learning needs in this topic area Assuming you are a beginner programmer, this the beginning of your journey! #

Agenda for the day Time Activity 9:45 Welcome and introductions 10:00 Python programming environment – using IDLE 10:30 Programs that input and output data 11:00 Coffee/tea break 11:15 Conditions and changing the flow of control 12:15 Practice: the Maze Game 13:00 Lunch 13:45 Using the while loop: repeating statements 14:15 Practice: Guessing Game 14:45 15:00 Practice: Creating a quiz 16:00 Evaluation and end of day #

Why program? … and what is computational thinking? Computational thinking is recognised as a key skill set for all 21st-century learners – whether they intend to continue with computing science or not. It involves viewing the world through the thinking practices that software developers use to write programs. 5 main areas: seeing a problem and its solution at many levels of detail (abstraction) thinking about tasks as a series of steps (algorithms) understanding that solving a large problem will involve breaking it down into a set of smaller problems (decomposition) appreciating that a new problem is likely to be related to other problems the learner has already solved (pattern recognition) realising that a solution to a problem may be made to solve a whole range of related problems (generalisation). Learning to program is a way of developing these skills #

Key features of computers Computers are deterministic: they do what you tell them to do. This is news to many, who think of them as pure magic. Computers are precise: they do exactly what you tell them to do. Computers can therefore be understood; they are just machines with logical working. #

Why Python? Once you learn one programming language you will find it easy to pick up others – it does not really matter which one you start with Python has become popular because it has a simple syntax, is free, and works on any platform. It is thought to be a good language for beginners. Most students will be moving from a visual programming environment (Scratch, Kodu, Alice) to a text-based programming language at some stage – whatever language they learn there will be a jump for them. The concepts underlying every programming language are the same. Only practice makes you a better programmer! #

Python demonstration Using the interpreter window (the “Shell”) Using the editor and saving and running programs Introducing variables Input and output Two data types: string and integer #

Exercise: Therapy program Write a program to have a dialogue with the user asking how they are and giving some suitable feedback – be sympathetic and ask more questions! Extension: Carry on with more exercises found here: Stuck? To repeat the demonstrations you have seen go to: http://pythonschool.net #

Coffee/tea break #

Python demonstration Using def to define a function Selection (if… then .. else) #

Exercises Write a function that asks the user to input a number between 1 and 20. Give a response which indicates if the number is either within the range, too high or too low. Solution Write a function which inputs the names of two football teams, and the score of one team followed by the score of the other team. Your function should calculate how many points each team gets (3 for a win,1 for a draw, 0 if they lose). Solution #

Maze Game In this task we have given you a starter program. It is a very simple game where you win if you find a pot of gold in the middle of a maze. Your task is to extend this program to include more challenge and more twists and turns! Perhaps you could add three directions to choose from, or more choices to make. Download the task starter program here. #

Lunch #

Demonstration in Python While loops #

Exercise: The Guessing Game In pairs, write a program that: Randomly generates a number between 1 and 100 Asks the user to guess it Tells the user if the number they guessed is too high or too low Repeats until the user guesses correctly EXTENSION: Tell the user how many guesses they had #

Coffee/tea break #

Developng a quiz (consolidation) This task uses all the programming skills you have learned today: Variables Assignment If statements While loops In pairs, write a quiz with two questions in it. Ask the question, input the user’s answer, then give feedback as to whether it is right or wrong. Then go on to the next question. Keep count of the score. Finish this task off at home as a take-home task if you don’t finish it today Extension: Give three goes to get the answer right. Stuck? Go to http://www.pythonschool.net/basics_task2/ 17

Recap: Objectives of the day To introduce some basic programming principles using the Python programming language To understand how and why variables are used To be able to understand and write a simple if statement To be able to understand and write a simple while loop To reflect on ways of teaching programming in the classroom To identify further learning needs in this topic area Have you achieved some or all of these? What are your next steps? #

Nearly the end of the day… Complete the feedback form before you go: https://www.surveymonkey.com/s/NoEFeedback Your certificate will be emailed to you once you have filled in the evaluation #

Next steps… Discuss in pairs what you will do after this training… Good ideas: Keep in email contact with the trainer and other teachers Use what you have learned in the classroom and write to the trainer/other teachers to let them know how you have got on. Continue working through the materials on http://pythonschool.net Attend your local CAS Hub meeting #