 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.

Slides:



Advertisements
Similar presentations
COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
Advertisements

Case Study By: The South Group
JavaScript Lesson 1 TBE 540. Prerequisites  Before beginning this lesson, the learner must be able to… Create a basic web page using a text editor and/or.
How to install the Zelle graphics package
By Alfredo Alvarez. Agenda: Find out who the instructor is. Talk about goals and why you want to learn python. Discuss the materials and the methodology.
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
Chapter 1: Python Basics CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp.
Noadswood Science,  To know the basics of Python coding and decoding Monday, September 07, 2015.
An Introduction to Textual Programming
Introduction to Computational Linguistics Programming I.
Lesson 6. GCSE Computing – programming languages Candidates should be able to:  describe common tools and facilities available in an integrated development.
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.
Lesson 4 Using Variables in Python – Creating a Simple ChatBot Program.
PROGRAMMING In Lesson 2. STARTER ACTIVITY Complete the starter activity in your python folder – lesson 2 Now we will see how you got on and update your.
Vocabulary in VB So Far. Assignment: Used to change the value of an object at run time Used to change the value of an object at run time.
I Power Higher Computing Software Development Development Languages and Environments.
Chapter 3: Branching and Program Flow CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
IDLE An IDE for Python bundled with the program release Click on IDLE (Python GUI) in the Start menu under the Python program group  Get the IDLE Python.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 4: Writing programs.
Introduction to Python Lesson 1 First Program. Learning Outcomes In this lesson the student will: 1.Learn some important facts about PC’s 2.Learn how.
You Need an Interpreter!. Closing the GAP Thus far, we’ve been struggling to speak to computers in “their” language, maybe its time we spoke to them in.
Windows Installation Tutorial NASA ARSET For Python help, contact: Justin Roberts-Pierel
Delphi first steps. How to create a project Open – File – New – VCL Forms Application.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Coding Time This is a starter activity and should take about 10 minutes [ slide 1 ] 1.Log in to your computer 2.Open IDLE 3.Start a script session (Select.
Introduction To Greenfoot
Introduction to Programming Python Lab 1: My First Program 8 January PythonLab1 lecture slides.ppt Ping Brennan
1. Starting 1 Let’s Learn Saenthong School, January – February 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
Introduction to Programming Python Lab 2: Variables 15 January PythonLab2 lecture slides.ppt Ping Brennan
Web Scraping with Python and Selenium. What is Web Scraping?  Software technique for extracting info from websites Get information programmatically that.
Introduction to Programming Python Lab 7: if Statement 19 February PythonLab7 lecture slides.ppt Ping Brennan
Windows Installation Tutorial NASA ARSET For Python help, contact: Justin Roberts-Pierel
Introduction to Programming Python Lab 6: Relational Operators and Boolean Variables 12 February PythonLab6 lecture slides.ppt Ping Brennan
Introducing Python 3 Introduction to Python. Introduction to Python L1 Introducing Python 3 Learning Objectives Know what Python is and some of the applications.
Introducing Python Introduction to Python.
Development Environment
CST 1101 Problem Solving Using Computers
Introduction to Programming
Introduction to Programming
Introduction to Programming
Introduction to Python
Introduction to Programming
Introduction to Programming
Introduction to Programmng in Python
Introduction to Programming
CLICK HERE TO BEGIN THE GAME!!
Introduction to Programming
Let's Learn Python and Pygame
Introduction to Programming
Introduction to Programming
Week 1 Computer Programming Year 9 – Unit 9.04
Introduction to Programming
Introduction to Programming
Teaching London Computing
Introduction to Programming
Introduction to Programming
Introduction to Programming
Blackboard Tutorial (Student)
CS 1111 Introduction to Programming Spring 2019
CSCI N207 Data Analysis Using Spreadsheet
Windows Installation Tutorial
Introduction to Programming
Introduction to Programming
Introduction to Programming
Introduction to Programming
Introduction to Programming
BASIC 17 Mr. Husch.
Starter Activities GCSE Python.
Iteration – While Loops
Presentation transcript:

 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 not meant to be a class in Python, but that is the language we use here…It is free after all. No…Not this kind of python!

 Computers needs 2 things to run your code – an editor and an interpreter. The editor is what you use to write the code. The interpreter makes the text into binary code that the machine can understand. Our interpreter is Python. Python comes with an application called IDLE which does both functions. Such a program is known as an IDE – Integrated Development Environment.

 Complete the following exercise. We will go over your answers when everyone is finished.

Here’s what the finished code should look like - Now let’s take a closer look at some of the elements of this code…

 First, we need to realize that there are variables being used. What’s a variable? Basically, a variable is a label for data. So what are the variables in this code?

Start by going to the Start button, choosing All Programs, scroll down and click on the Python 3.0 folder, and finally, click on the IDLE(Python GUI). The Python shell should open up just like this…

 Once the code is entered correctly, the next thing you should do is save your work. Go to the ‘File’ menu and choose ‘Save As’. Name your file game.py. Next, go to the ‘Run’ menu and choose ‘Run Module’.

It would be useful to know more than whether your guess is right or wrong. Like maybe if your guess should be higher or lower.

 Complete the “Program Modification” exercise on the handout.

Guess == 5 True False Print(“You Win!”) Too High! Too Low! True False Game Over! Guess > 5

 Now we need to look at how to write the additional code for the new branch that we have added to the false path… Guess == 5 Print(“You Win!”) Guess > 5 Too High! Too Low! Game Over!