ASSIGNMENT : 1
Name : Dhanashri Hemant Bahalkar.
Roll Number :01
Batch : S1
Date of Performance :
Title : Write a python program to understand expressions, variables and
basic Math operations.
Input :
# Mathematical operation on Intergers
print ("Sum is", 45+56)
print("Substraction is :",56-45)
print("Division is:",56/2)
print("Multipication is:",45*56)
#Remove and insert of elements in the string
List = [ 3,6,8,9]
list.remove(6)
print(list)
data = ["mumbai","dhule","nashik"]
data.append("delhi")
print(data)
data.remove("mumbai")
print(data)
#Index value of strings
str1 ="Hello World!"
str2 ="Hello Python"
str3 ="Hello World!"
print(str1== str2 ,"its not correct")
#Index value of strings
print(str1==str3,"this one")
print(str1[0],str1[2],str1[3],str1[4],str1[5],str1[6],str1[7])
#Concadination of strings
result =str1+str2
print(result)
#Conditional statements
if (str1==str2):
print ("Its the same")
else:
print("its not the same")
Output :
PS C:\Users\Admin\.ipython> &
C:/Users/Admin/AppData/Local/Programs/Python/Python312/python.exe
c:/Users/Admin/.ipython/hello.py
Sum is 101
Substraction is : 11
Division is: 28.0
Multipication is: 2520
[3, 8, 9]
['mumbai', 'dhule', 'nashik', 'delhi']
['dhule', 'nashik', 'delhi']
False its not correct
True this one
Hllo Wo
Hello World!Hello Python
Its not the same