Basics of Python programming
Python programming
Day -1 :
Fundamentals of python programming:
Data types :
a) strings
b) tuples
c) lists
d) dictionary
e) numeric : Int , float, complex
f ) sets
g) boolean
Strings
1) concatenation
2) Modification
3) slicing
4) string methods
operators:
1) Arithmetic operators : + , / ,* , / , // , % , **
2) Assignment operators : + = , - = , * =, / =, % = ,etc
3) Comparison operators : = = , != , < , > .<= ,>=
4)Logical operators:AND , OR , NOT
5)Identity operators : is , is not
6)Membership operators : in , not in
7)Bit-wise operators : & , ~ , | , ^
Programs executed on day 1 (strings) :
1) Check if input by user is integer or not :
code :
2) Identifying unique words in a string :
code:
3) Replacing spaces in a string by # key:
code :
4) Count of vowels appearing in user input string :
code:
5) Printing largest and smallest word in string given by user :
code:
Comments
Post a Comment