simonePart B Format
simonePart B Format
Experiment - 1
PART B
(Students must submit the soft copy as per following segments within two hours of the
practical. The soft copy must be uploaded on the Teams or emailed to the concerned lab
in charge faculties at the end of the practical in case the there is no Black board access
available)
Semester: 4 Batch: D2
Grade:
1
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
https://colab.research.google.com/drive/1GOUV20YVbrsi_tDr4kxDlDQJDLyO2MM3?usp=sharing
Tas
k 1:
mystring = "hello"
myfloat = 10.0
myint = 20
# testing code
if mystring == "hello":
2
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
3. x = object()
y = object()
x_list = [x] * 10
y_list = [y] * 10
# testing code
print("Almost there...")
print("Great!")
Tas Savings=100
k
3:a print(Savings)
3
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
if(sign=='+'):
print("Ans is",num1+num2)
elif(sign=='-'):
print("Ans is",num1-num2)
elif(sign=='*'):
print("Ans is",num1*num2)
elif(sign=='/'):
print("Ans is",num1/num2)
else:
print("Invalid sign")
print("Sum is",num1+num2)
print("Difference is",num1-num2)
print("product is",num1*num2)
4
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
print("Age of",first_name,last_name,"is",age)
i P=int(input("Principle(amount): "))
T=int(input("Time: "))
R=float(input("Rate: "))
Interest=P*(1+R/100)**T
j sum=0
for i in range(1,6):
sum=nums+sum
if(sum<100):
else:
5
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
k A=int(input("Enter a "))
B=int(input("Enter b "))
print("Remainder is",A%B)
Tas https://python-iitk.vlabs.ac.in/exp/arithmetic-operations/simulation.html
k 4:
6
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
Tas
k 1:
Tas
k 2:
7
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
Tas
k
3:A
8
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
9
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
10
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
11
SVKM’s NMIMS University
Mukesh Patel School of Technology Management & Engineering
COURSE: Basics of Python Lab Manual
BTI Sem IV Academic Year 2024-2025
Tas
k 4:
Figure 17-task 4
B.3 Conclusion:
12