Computational Thinking Unti-1 Computational Thinking
Define computational thinking Draw flow charts Lesson Objectives: Define computational thinking Draw flow charts Use of comments in python Understand variables - datatypes and python operators.
1. Computational Thinking
How to make a cup of coffee: Discuss
How to make a paper Airplane? Discuss
How to calculate a rectangle room size? Discuss
How to make a fish aquarium? Discuss
Algorithm
Steps of Programming Process Algorithms An Algorithm is a set of rules or steps used to solve a problem. Test your algorithm Steps of Programming Process Design an algorithm Analyze Problem Use the program Implement algorithm
Flow Chart A flow chart is a diagram that shows the steps used to solve a problem Flow chart uses standard symbols to represent the different instructions
Challenge1: The sum of two numbers Write an algorithm and design the flow chart for the following case: The sum of two numbers
Challenge2: Write an algorithm and design the flow chart for the following case: Mariam got a land in a square shape , with an L Length and intended to sell the land by X price for single square meter . What will be the price of the land ?
Book Activity P-31 & 32
Book Activity Page 32
2. Comments
Comments Practical Task # Comments are used to write descriptive comments to help you debug and share codes. Practical Task Open python program and create new python file called “Lesson2” Use comments tag to write your name Your class
3. Variables
36980 + 12555
num Variable & Data Type A variable is a named location in computer’s memory that is used to store data. Each variable has a name and a value. The name of the variable should not start with a number or a symbol. The name of the variable should represent the data you be storing num
Book Activity P-35 - 36
Open python program - “Lesson2” Type the following: Practical Task Open python program - “Lesson2” Type the following: name = input(“Enter Your Name” ) print (“Hello” , name) Ask the user to enter age and then print Your age is …
4. Python Operators
Operands data that we are working with to perform operations Python Operators Operators are the instructions that tell the computer what to do with the data - (Mathematical Operators) num=17 Total = num + 293 Operand Operand Operator Operator Operands data that we are working with to perform operations
Arithmetic Operators
5. Data Types
Data types are used to classify the data used in a computer program.
Activity What’s your name ? Work in pair .. And ask your colleague the following questions .. What’s your name ? How much do you expect today’s temperature ? What is the value of PI ?
int float string Definition Operations can be carried out Example Data Types integer byte short int long Floating Point float double character string Definition Operations can be carried out Example Integer (int) Whole numbers (positive and negative) + , - , *, / , %, ** 380 , -200 Float (float) Decimal numbers (positive and negative) 2.6 , -9.1 String (string) Characters / letters declared between “ “ + “Year” , “Zayed”
End of Unit Activities