0% found this document useful (0 votes)
5 views

Python Pr01

The document is an assignment by Dhanashri Hemant Bahalkar that includes a Python program demonstrating basic math operations, string manipulation, and conditional statements. It showcases operations such as addition, subtraction, string concatenation, and element removal from lists. The output of the program is also provided, illustrating the results of the executed code.

Uploaded by

wafflerick69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Python Pr01

The document is an assignment by Dhanashri Hemant Bahalkar that includes a Python program demonstrating basic math operations, string manipulation, and conditional statements. It showcases operations such as addition, subtraction, string concatenation, and element removal from lists. The output of the program is also provided, illustrating the results of the executed code.

Uploaded by

wafflerick69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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

You might also like