Posts

Files, Modules, Exceptions with basic examples

Python Basics Exercises

Exercises: Python Basics                                                                                     Go to editor!!! Print a string print "I am getting started" Arithmetic Operators expression=2+3*6/2 print expression Get user input  fname = raw_input("Input your First Name : ")  #use Input()in python 3.X lname = raw_input("Input your Last Name : ") print ("Hello  " + lname + " " + fname) String functions str = "this is string example....wow!!!"; print str.capitalize() print str.upper() print str.lower() print len(str) print str.replace(" is", " was") print str.split( ) List Functions  ls = [32,12,43,23,55] print len(ls) ls.sort(); print ls ls.reverse(); print ls ls.insert(1,22); print ls print ls.count(12) Tuple functions tp = (32,12,43,23,55) print len(tp) print max(tp) print min(tp) print list(tp) # conversion to list tp.sort(); #Tuple cannot be sorted Di

PYTHON BASICS SIMPLIFIED

Image
PYTHON BASICS SIMPLIFIED What is Python? Python is a high level multipurpose scripting language used in web development, desktop application development, artificial intelligence, machine learning, game development, automation, tools development and a lot more. Why Python?  Easy Syntax & Readability  Extensive standard library  Large community  Object oriented like any other efficient programming language.  Many popular companies like Youtube, Instagram, 
 Pinterest etc., use Python. Getting Started Installation:               Instructions available at              https://wiki.python.org/moin/BeginnersGuide/Download Getting familiar with basic syntax: Check basic python information on your machine such as python version using the command “python”.  Standard output : Use the command “print” to print data to output. (use command “print()” from python3) Identifiers (Variables, Functions, Classes, Modules etc.,): Can be alphanumeric and are case-se

PYTHON BASICS SIMPLIFIED PPT