
Python_Lesson 2
Presentation
•
Computers
•
6th Grade
•
Easy
Viktoriia Kapustianchyk
Used 1+ times
FREE Resource
17 Slides • 1 Question
1
PYTHON OPERATORS
Lesson 2
2
3
Programming Languages
Programs are written in languages called programming languages.
Humans can understand high-level languages such as Python, C# and Java.
Computers can understand low-level languages such as Assembly Language and Machine Code.
4
Compilers & Interpreters
Translate programs from high-level to low-level languages.
Interpreters translate code line by line.
Interpreters are used each time the code is run.
Compilers translate code all at once and make an executable file.
5
Python
Python is a powerful high level language
It is an Object Oriented Programming Language
It was developed by Guido Van Rossum
6
print("Hello world")
world =
print("Hello", world)
7
Python Operators
Operators are special symbols, or combinations of symbols, that designate some type of computation.
8
+ - * /
These are the basic mathematical operators.
9
In Python you can use maths operators to do sums:
+ | add |
- | subtract |
* | multiply |
/ | divide |
** | to the power |
Create a calculation
print(230 5782 * 2 / 23781)
10
Match
Match the following
/
*
+
=
-
divided by
multiplied by
add
assigns a value
substract
divided by
multiplied by
add
assigns a value
substract
11
print()
Don't forget: we can use the print() command to display an output.
e.g. print(14-2)
would show 12 as an output
12
Concatenating
If we want to output several things at once, we can separate them with commas:
e.g. print("There are ", 3, " left")
would output: There are 3 left
13
=
= does not work as a mathematical operator. Instead, = is used to assign a value to a variable.
e.g. name = "John Smith"
14
=
However, we can use = to assign a value to a variable that is the result of a calculation.
e.g. result = 3 + 5
print(result)
This will output the value 8.
15
==
This operator will check if two pieces of data are equal. If they are, it will return a value of true.
e.g. 2==2 will return a value of true
2==5 will return a value of false
16
Try the following statements in python window or make use of online link and give output:
print ("Welcome")
print (4+5+7)
print (89-5+7*4)
17
18
PYTHON OPERATORS
Lesson 2
Show answer
Auto Play
Slide 1 / 18
SLIDE
Similar Resources on Wayground
13 questions
Profesi PPLG
Presentation
•
6th Grade
10 questions
HTML Editors
Presentation
•
7th Grade
16 questions
While
Presentation
•
KG
13 questions
Chapter 5 Section 1-Ancient India
Presentation
•
6th Grade
12 questions
Maps and Regions
Presentation
•
6th Grade
16 questions
Comparison & Logical Operators
Presentation
•
6th Grade
10 questions
Printing
Presentation
•
6th Grade
10 questions
Internet Safety
Presentation
•
6th Grade
Popular Resources on Wayground
5 questions
A Home on the Shore
Quiz
•
3rd Grade
28 questions
US History Regents Review
Quiz
•
11th Grade
6 questions
A Horse Tale
Quiz
•
3rd Grade
20 questions
Math Review
Quiz
•
3rd Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
20 questions
Dividing Fractions
Quiz
•
5th Grade
55 questions
A Long Walk to Water Final Review
Quiz
•
6th - 8th Grade
10 questions
Equation Word Problems
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
55 questions
A Long Walk to Water Final Review
Quiz
•
6th - 8th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
10 questions
Static and Dynamic Characters
Quiz
•
6th Grade
42 questions
ELA Final Exam Review
Quiz
•
6th Grade
23 questions
Potential and Kinetic Energy
Quiz
•
6th Grade
20 questions
All About Chicken Nuggets
Quiz
•
6th Grade
28 questions
A Rover's Story, part 1
Quiz
•
6th - 8th Grade