Please
Mute your Self
Lecture-1
Python for Kids
Agenda
About ATS 5 PM - 6 PM
Friday
Introduction to Python 04-Sept-2020
Coding in Shell Mode
In-Built Functions
Expressions
About ATS
• Fast growing software training institute.
• work on concepts and skills with hands on experience instead.
• Faculties are experienced, expert and best in their own filed.
• Both Online and Offline mode.
• Guarantees about your skill if you follow the instructions of trainer.
• Each age group according to their own level.
Introduction-Python
1. Developer: Guido Van Rossum,
2. CWI (Centrum Wiskunde & Informatica)
Netherlands.
3. 1991
4. High level Computer programming Language
Computer Language
Computer Programming Language
High Level Low Level
C/C++ JAVA Python etc Machine Assembly
Translators
Compiler HL => LL
Interpreter HL => LL Python
Assembler AL =>ML
Installation
• The current production versions are Python 3.8.
• https://www.python.org/downloads/
• www.w3resource.com
Modes of Coding
Python provides two types of coding modes:
1. Interactive Mode
2. Script Mode
1. Interactive Mode: is also known as command
line mode, Shell mode or interface, here we
code in shell directly.
2. Script Mode: coding in files using editor.
Interactive Mode
• Interactive mode uses IDLE (Python
Integrated Development and Learning
Environment)
Steps to use Interactive Mode
1. Locate IDLE in window search bar,
2. Double click on it, it will open a shell with “>>>” prompt.
3. You can directly write the commands there and press
enter to execute .
Working with Shell
>>> print(“Welcome in ATS”)
>>> print(“Welcome \n in ATS”)
Welcome in ATS
Welcome
>>> a = “Welcome in ATS”
in ATS
>>> print(a)
>>> print(“Welcome \t in ATS”)
Welcome in ATS
Welcome in ATS
>>> print(“Welcome \\ in ATS”)
Escape Sequences:
Welcome \ in ATS
\n : new Line
\t : tab
\r : carriage return
\b : back space
\’ : to print (‘ )
\\ : to print (\)
\” : to print (“ )
>>> len(“ATS”)
3
Built-in Functions
>>> b = len(“ATS”)
Char ASCII Char ASCII
>>> print(b)
‘A’ : 65 ‘a’ : 97
3
‘B’ : 66 ‘b’ : 98
>>> max(3,10)
‘C’ : 67 ‘c’ : 99
10
: :
>>> min(3,10)
: :
3
‘Z’ : 90 ‘z’ : 122
>>>ord(‘A’)
65 Char ASCII
>>>chr(65) ‘0’ : 48
A ‘1’ : 49
‘2’ : 50
‘9’ : 57
>>> a = 10
>>> print(a)
Arithmetic Expressions
10 Printing Values with Message
>>> b = 5 >>> print(“value of First number =“, a)
>>> print(b) value of First number =10
5 >>> print(“value of Second number =“, b)
>>> print(a+b) value of Second number =5
15 >>> print(“Addition of Both =“, a+b)
>>> c=a+b Addition of Both =15
>>> print(c) OR
15 >>> print(“value of First number =“, a, “\nvalue of
Second number =“, b,“\nAddition of Both =“, a+b)
>>> c=a*b
value of First number =10
>>> print(c)
value of Second number =5
50
Addition of Both =15
Assignments
1. Write a program to display your Boidata as Follows:
Name : your name
Age : Your age
Address : Your address
Mobile : your number
2. Write a program to display the predecessor and successor value of given character.
3. Write a program to display the predecessor and successor value of given number.
4. Write a program to display the next five consecutive alphabets of given character.
5. Write a program to display the next five consecutive number of given number.
6. Write a program to display the previous five numbers of given number.
7. Write a program to display the next five multiple of given number.