University Department, Rajasthan Technical
University, Kota
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
Python, Web designing
Prepared By:- University roll no.:-
Jitasha Jain 20EUCEC022
Kanika Vyas 20EUCEC023
Introduction to Python
• Python is an object-oriented, high level language, interpreted, dynamic and
multipurpose programming language.
• It was created by Guido van Rossum in 1989. Like Perl, Python source code is also
available under the GNU General Public License (GPL).
• Python is easy to very easy to use and high level language. Thus it is programmer-
friendly language.
• Cross-platform language: Python can run equally on different platforms such as
Windows, Linux, Unix, Macintosh etc. Thus, Python is a portable language.
Operations
1. Arithmetic Operators
2. Relational Operators
3. Assignment Operators
4. Logical Operators
5. Membership Operators
6. Identity Operators
7. Bitwise Operators
Selective Statements
• Simple If
if(condition):
code
• Nested If
if(condition1):
if(condition2):
code1
else:
code2
else:
code3
• If with Else
if(condition):
code1
else:
code2
• Ladder If
if(condition1):
code1
elif(condition2):
code2
else:
• lists can be heterogeneous
a = ['spam', 'eggs', 100, 1234, 2*2]
• Lists can be indexed and sliced:
a[0]  spam
a[:2]  ['spam', 'eggs']
• Lists can be manipulated
a[2] = a[2] + 23
a[0:2] = [1,12]
a[0:0] = []
len(a)  5
Lists
Functions
• First line is docstring
• first look for variables in local, then global
• need global to assign global variables
def fib(n):
"""Print a Fibonacci series up to n."""
a, b = 0, 1
while b < n:
print b,
a, b = b, a + b
>>> fib(2000)
Project
Front Page of My Project
Admin Page Hospital Page
SQL “drdata” table

Python ppt.pptx

  • 1.
    University Department, RajasthanTechnical University, Kota DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING Python, Web designing Prepared By:- University roll no.:- Jitasha Jain 20EUCEC022 Kanika Vyas 20EUCEC023
  • 2.
    Introduction to Python •Python is an object-oriented, high level language, interpreted, dynamic and multipurpose programming language. • It was created by Guido van Rossum in 1989. Like Perl, Python source code is also available under the GNU General Public License (GPL). • Python is easy to very easy to use and high level language. Thus it is programmer- friendly language. • Cross-platform language: Python can run equally on different platforms such as Windows, Linux, Unix, Macintosh etc. Thus, Python is a portable language.
  • 3.
    Operations 1. Arithmetic Operators 2.Relational Operators 3. Assignment Operators 4. Logical Operators 5. Membership Operators 6. Identity Operators 7. Bitwise Operators
  • 4.
    Selective Statements • SimpleIf if(condition): code • Nested If if(condition1): if(condition2): code1 else: code2 else: code3 • If with Else if(condition): code1 else: code2 • Ladder If if(condition1): code1 elif(condition2): code2 else:
  • 5.
    • lists canbe heterogeneous a = ['spam', 'eggs', 100, 1234, 2*2] • Lists can be indexed and sliced: a[0]  spam a[:2]  ['spam', 'eggs'] • Lists can be manipulated a[2] = a[2] + 23 a[0:2] = [1,12] a[0:0] = [] len(a)  5 Lists
  • 6.
    Functions • First lineis docstring • first look for variables in local, then global • need global to assign global variables def fib(n): """Print a Fibonacci series up to n.""" a, b = 0, 1 while b < n: print b, a, b = b, a + b >>> fib(2000)
  • 7.
  • 8.
  • 9.