G7 programing language Teacher / Shamsa Hassan Alhassouni.

Slides:



Advertisements
Similar presentations
Python November 14, Unit 7. Python Hello world, in class.
Advertisements

INTRODUCTION TO PYTHON PART 2 INPUT AND OUTPUT CSC482 Introduction to Text Analytics Thomas Tiahrt, MA, PhD.
Programing App Inventor. Variable Declaration App Inventor: Declare Variables using the “Define Variable As” Block – Find the Blocks Editor (top-left),
Programming is instructing a computer to perform a task for you with the help of a programming language.
Do Now Noticing skills What does input do?. Annotate your code to explain what happens name = input( “What is your name?\n” ) print(“Hello ”, name) Extension-Python.
Lab 3 Instructions Drill: Write a letter
Python File Handling. In all the programs you have made so far when program is closed all the data is lost, but what if you want to keep the data to use.
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
Data Types Integer 15 StringHelloThere! Float/Real BooleanYes / No CharP.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Type accurately challenge! This is a starter activity and should take 2 minutes [ slide 1 ] 1.Can you type out the code in Code Box 2.1 with no errors.
Lesson 6. Python 3.3 Objectives. In this lesson students will learn how to output data to the screen and request input from the user. Students will also.
Maths in Python [ slide 5 ] 1.Copy the table 2.Race a friend with a calculator to see whether Python is faster than a calculator: a) 5 * 6.5 = b)7 / 3.
Using variable Variables are used to store values.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
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.
GCSE Computing: Programming GCSE Programming Remembering Python.
Getting Started With Python Brendan Routledge
Input, Output and Variables GCSE Computer Science – Python.
Few More Math Operators
GCSE COMPUTER SCIENCE Practical Programming using Python
Math operations 9/19/16.
Numbers and arithmetic
Lesson 03: Variables and Types
what is computer programming?
Numbers and Arithmetic
Introduction to Programming
Whatcha doin'? Aims: To start using Python. To understand loops.
3.1 Fundamentals of algorithms
Using the Console.
What Actions Do We Have Part 1
Input and Output Upsorn Praphamontripong CS 1110
Lesson 1 - Sequencing.
Lecture 4: Expressions and Variables
Lesson 1 An Introduction
Introduction to Python Data Types and Variables
Variables, Expressions, and IO
Design and Technology Academic Year 2017/2018 Grade 7 First Semester.
Formatting Output.
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Functions CIS 40 – Introduction to Programming in Python
To write a Python program, you first need to open Pyscripter
PHP Introduction.
Computational Thinking
Computational Thinking
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Fill the screen challenge!
Use proper case (ie Caps for the beginnings of words)
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Learning Outcomes –Lesson 4
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Hello World! Syntax.
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Variables and Expressions
Lesson 03: Variables and Types
Inputs and Variables Programming Guides.
Variables In today’s lesson we will look at: what a variable is
21 3 Variables Selection Functions Repetition Challenge 21
Python Basics with Jupyter Notebook
Lecture 4: Expressions and Variables
Basic Lessons 5 & 6 Mr. Kalmes.
Introduction to Python
Unit 1: Intro Lesson 4: Output.
Starter Which of these inventions is: Used most by people in Britain
What you need to do… Drag the pieces of code into the correct order like you can see in the EXAMPLE below. print ( “ int input ) = + Hello world chr ord.
Python SAT 1 Feedback.
Hardware is… Software is…
Intro to Programming (in JavaScript)
Presentation transcript:

G7 programing language Teacher / Shamsa Hassan Alhassouni

What we will Learn today? Combination of text and numbers Understand variables , inputs Practical tasks

9533 100 3 print(“95” + “33”) print( 50*2) Think & Share print( 15//4) Without using python program.. What will be the output of the following statements ? print(“95” + “33”) print( 50*2) print( 15//4) print( 15%4) 9533 100 3

Activity 1. Open the python edu Select ‘the existing project named (grade7-1) Click file > new > python file Give the python file a name. (math2-7-1) print (“111 divided by 4 = “ , 111/4)

Combining text and numbers Python can combine between text and numbers and , is used as separator. What will be the output of the following line: print (“11 divided by 4 also equals= “ , 11/4, “remainder “, 11%4) 11 divided by 4 also equals= 2.75 remainder 3

Its like a box used to store information (numbers or string) Variables Its like a box used to store information (numbers or string) Books How to write in Python : Declare name (no spaces allowed) Assign a value Use the variable num1 = 1 num2 = 5 print (num1 + num2) print (num2 – num1) print (num1 * num2) Super Student Shoes Task num = 1 Print (num) Accessories

Variables Task Challenge Question String We can use variables for string also String Task text1= “hello” text2= “friends” print (text1 + text2) text= “hello” print (text) Super Student   a = 10 a =1 a=2 b = 2 print(a + b) one = 1 two = 2 three = one + two print(three)  Challenge Question Write the output without using Python

Inputs To get input from user we use function called (input) Output is when sending back data Hello!! Hi !! How are you ladies ? Fine ..Thanks How old are you ? 12 Where do you live ? Dubai

Task name = input ("what is your name ? ") print (name) Super Student Try to code the following What is your name ? Mariam Hello mariam name = input ("what is your name ? ") print (name) Super Student year= input (“which year was you born ?") print (year) Try to code the following Which year was you born? Mariam born in 2004

Challenge P/43 Joining String We use (+) to join between string only name = input("What's your name? ") print("Nice " + name + "!") age = input("Your age? ") print("So " + age + " years old, " + name + "!")  We use (+) to join between string only Challenge P/43 Book Activity – Calculate area of the room Area = Width * Height Area = W * H

Challenge 2 Challenge HW P-44 Book Activity – Calculate each person how much to pay Challenge HW P-44 Make a program TO ask “What is the total cost of the bill ? “ “ How much is the percentage of the tip ?” “How many people will share the bill ? “ Then calculate the price per each person

How easy did find the today’s lesson in python?