[go: up one dir, main page]

0% found this document useful (0 votes)
19 views31 pages

Pythonforkids 1 231112071330 D4c6a256

Uploaded by

Aisha Anwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views31 pages

Pythonforkids 1 231112071330 D4c6a256

Uploaded by

Aisha Anwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Python for

kids
Part 1
Hello! I am Aditya
I am here because I love to sharing my
knowledge.
You can find me at @techyAdi:Coding for kids
2
Roadmap Variables,
Literals, Data
What is Python? First Program Types
1 3 5

2 4 6

Download Rules for Input in python


Python Identifiers
And comments
3
What is
Python?
Python is a programming
language that lets you work
quickly and integrate systems
more effectively.

4
Applications of python
1. Web Development
2. Game Development
3. Machine Learning
4. Mathematics
5. Education: Python is a superb language for teaching
programming, both at the introductory level and in more
advanced courses.
6. Desktop GUI
7. Software Development: Python is often used as a support
language for software developers, for build control and
management, testing, and in many other ways.
8. Operating System
9. Artificial Intelligence
10. Internet of Things (IoT)
5
Download
Python
https://www.python.org/downloads/

6
Where to use python online
▪ Ideone : https://ideone.com/
▪ GBD compiler:
https://www.onlinegdb.com/
▪ Google Colab:
https://colab.research.google.com/
And many more...

7
Hello World!
My first program in python

8
Code
print(“hello world!”)

9
What are
identifiers
A Python identifier is a name used to identify a
variable, function, class, module or other object.

10
Rules for naming identifiers
▪ Identifiers can be a combination of letters in
lowercase (a to z) or uppercase (A to Z) or digits
(0 to 9) or an underscore _. Names like myClass,
var_1 and print_this_to_screen, all are valid
example.
▪ An identifier cannot start with a digit. 1variable is
invalid, but variable1 is a valid name.
▪ Keywords cannot be used as identifiers.
▪ We cannot use special symbols like !, @, #, $, %
etc. in our identifier.
▪ An identifier can be of any length.
11
What are
Keywords
Keywords are reserved words and you cannot
use them as constant or variable or any other
identifier names. All the Python keywords
contain lowercase letters only.

12
Keywords in python are:
and exec not

assert finally or

break for pass

class from print

continue global raise

def if return

del import try

elif in while
13
Comments in
Python
Single Line Comments: Python single line comment
starts with hashtag symbol with no white spaces (#)
and lasts till the end of the line.

14
Comments in
Python
Multi-Line Comments: Python multi-line comment
is a piece of text enclosed in a delimiter (""") on each
end of the comment.

15
variables
Reserved memory locations to store values

16
17
Using variables in python
Assignment operator (=) is used to
assign a value to a variable.

18
Literals
Raw data given in a variable or constant

19
Data Types in
python
String: sequence of characters surrounded by quotes.

Numeric: they are of three types:


▪ Integer
▪ Float
▪ Complex
Boolean: It can have only two values (true/false)

20
Collections
Lists: List is an ordered sequence of items. All the
items in a list do not need to be of the same type.

21
Collections
Tuple: They are like lists but cannot be modified.

22
Collections
Set: Set is a unordered collection of unique items.

23
Collections
Dictionary: Dictionary is an unordered collection of
key-value pairs. It is generally used when we have a
huge amount of data. Dictionaries are optimized for
retrieving data. We must know the key to retrieve the
value.

24
Input in
python
Using input()

25
26
Exercise
1. Write a program to enter a number and print 5 times of
that number. (number *5).
2. Write a program to define a set of numbers in table of
19.
3. Write a program to input two numbers and print their
sum.

27
Solutions

28
Link for all
Code
https://colab.research.google.com/drive/
1yMTEr3tL7eYkYeiuXwgVNuxqc7M
FbMhA?usp=sharing
Extra
Resources
● https://www.youtube.com/watch?v=73
DKe1W5KmU&t=9s
● https://www.youtube.com/watch?v=ErJ
0DHZIHVk
● https://www.youtube.com/watch?v=
-KToCMl9XT0
● https://www.youtube.com/watch?v=
SF7IYpAab60&t=4s
Any questions?
You can find me at:
▪ minku.aditya2012@gmail.com
▪ https://www.facebook.com/techy
Adi.Coding

31

You might also like