Fill the screen challenge!

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

Programming Languages. Objectives Understand how programming has evolved Be able to write simple programs using a text based programming language.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
Introduction to Python
Python Programming Using Variables and input. Objectives We’re learning to make use of if statements to enable code to ask questions. Outcomes Build an.
Section 3 Calculations National 4/5 Scratch Course.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Section 2 Variables National 4/5 Scratch Course. What you should know after this lesson What a variable is Where variables are stored How to get data.
Input, Output, and Processing
Do it now activity Last term we learnt about how data is represented in a computer and about how to identify different volumes of data. How many bits in.
5 BASIC CONCEPTS OF ANY PROGRAMMING LANGUAGE Let’s get started …
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Introduction to programming in the Java programming language.
Lesson 4 Using Variables in Python – Creating a Simple ChatBot Program.
Fill the screen challenge! This is a starter activity and should take 3 minutes [ slide 1 ] 1.Log in to your computer 2.Open IDLE 3.In interactive mode,
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.
Python Programming Using Variables and input. Objectives We’re learning to use basic knowledge of variables combined with user input. Outcomes Continue.
My Python Programmes NAME:.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
NAME Python Programming Workbook Select a Lesson:
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
COMPUTER PROGRAMMING Year 9 – Unit 9.04 Week 3. Open the Python INTERPRETER Can you use the interpreter to solve these maths problems? 156 add
University Learning in Schools Computing Games Programming Lesson 5.
For Loop GCSE Computer Science – Python. For Loop The for loop iterates over the items in a sequence, which can be a string or a list (we will discuss.
Programming In Python. Starter Using the internet… Find what a programming language is.
COMPUTER PROGRAMMING Year 9 – lesson 1. Objective and Outcome Teaching Objective We are going to look at how to construct a computer program. We will.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
Topic 02: Introduction to ActionScript 3.0
Software Development.
what is computer programming?
Whatcha doin'? Aims: To start using Python. To understand loops.
3.1 Fundamentals of algorithms
A Playful Introduction to Programming by Jason R. Briggs
Python: Experiencing IDLE, writing simple programs
Python Let’s get started!.
Variables, Expressions, and IO
Basic operations in Matlab
Explain what touch develop is to your students:
Learning to Program in Python
Learning to Program in Python
Week 3 Computer Programming Learning Objective:
Computer Science and an introduction to Pascal
Learning to Program in Python
Today’s lesson – Python next steps
Language Basics.
Programming In Lesson 3.
Learning Outcomes –Lesson 4
Week 2 Computer Programming Learning Objective:
Learning to Program in Python
Escape sequences: Practice using the escape sequences on the code below to see what happens. Try this next code to help you understand the last two sequences.
Lesson 2: Input and Variables
Teaching London Computing
COMPUTER PROGRAMMING PYTHON
Task 1 Computer Programming LEVEL 6 PROGRAMMING:
A look at Python Programming Language 2018.
Starter answer these questions in your book
Introduction In today’s lesson we will look at: why Python?
PYTHON: BUILDING BLOCKS Inputs & Outputs
12th Computer Science – Unit 5
Chapter 1: Programming Basics, Python History and Program Components
Introduction to Python
Introduction to Python programming for KS3
Explain what touch develop is to your students:
CMPT 120 Lecture 3 - Introduction to Computing Science – Programming language, Variables, Strings, Lists and Modules.
L L Line CSE 420 Computer Games Lecture #3 Introduction to Python.
Starter Which of these inventions is: Used most by people in Britain
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

Fill the screen challenge! [ slide 1 ] Fill the screen challenge! This is a starter activity and should take 3 minutes Log in to your computer Open IDLE In interactive mode, fill your screen with the name of your favourite food. Hint: Use the print(“………………….” * 100 ) function and the symbol to multiply * 4. Use \n to print to a new line >>> print ("fred smith " *20) This will print out the name 20 times one after the other >>> print ("fred smith \n" *20) This will print out the name 20 times each one on a new line

Learning Intentions Lesson 3 “Chatbots & Artificial intelligence” Learning Intentions Lesson 3 Describe an experience of Artificial intelligence from using chatbots Build the first part of an artificial intelligence program using Python Explain what is meant by the term vairiable

Keywords – glue in your books [ slide 2 ] Keywords – glue in your books Variables: A parameter which can be created to store a value which may be retrieved, changed and used in programs at any point. Declare: When a variable is created by giving it a name (and data type) Comment: Text which is not part of an algorithm but explains details of the program to those working on it In python this is preceded with a # Comments in Python: Explain that a comment is a line of code that isn’t part of the program but is there to explain to the programmer what parts of the code are doing. We write comments in regular clear English (or whatever language we as programmers may speak) as opposed to the language of Python. Explain that comments are important as when we write longer pieces of code we may forget the function of different parts, or we may work on code collaboratively with others and therefore we need to explain what we are doing. However, explain that the trouble with writing in regular English within our program is that our computer thinks we are still writing in Python and may try and interpret commands from what we have said. As such, we need to indicate when we are writing a comment and we do that by using ‘#’. Explain that the computer will ignore any line starting with # as it knows this is a comment to the programmer and not part of the code. Demonstrate adding comments to the variable we just created to add explanation about what we are coding and ask the children to do the same

Ask a chatbot some questions Click here to find a chatbot Select the chatbot What questions will you ask?

What did you find out? What sorts of questions are the chatbots very good at? What questions do chatbots not answer very well? What processes are taking place after the user types in a question? What tricks does the chatbot use to make it seem real ie artificially intelligent

What questions? What kinds of questions and information do people ask when they first meet each other? Think, pair, share the topics you have discussed.

Possible topics Where do you live? Do you have any brothers or sisters? How old are you? What is your favourite food? ………….?

Build an artificial intelligence program Do you remember this program from last lesson?

Opening saved programs In the IDLE screen click on File Open then select the my_name file that you saved last week. What questions can you add to the program?

Chatbots Edit the program, save as questions Print out this slide for less able pupils to copy

Extra - Can you add a summary? Can you create some script at the end of the program that might look something like this….? “So James, it was lovely to meet you. I know that you live in Newport and that your favourite food is pizza”

Evaluate each other’s programs A program that works = 1 point Working program with 3 or more questions = 2 points Working program with 3 or more questions with a summary at the end = 3 points Check pupil progress can use 1, 2 or 3 fingers or white boards to show their points

Extension task Can you identify the variables * strings in the programs you have written? Make a note of them in your book

Variables – items that can change Variable examples: my_name = input () favourite_food = input () my_age = input () my_school = input ()

Strings – a sequence of characters String examples: “Hello world” “What is your name” “What is your favourite food” “It is good fun talking to chatbots” Explain to the pupils the definition of a string – A string is a series of characters treated as a single unit. A string may include letters, digits, and various special characters.

Learning Intentions Lesson 3 Describe an experience of Artificial intelligence from using chatbots Build the first part of an artificial intelligence program using Python Explain what is meant by the term vairiable