Professional Documents
Culture Documents
Module - 2 ASSIGNMENT: Please Implement by Using Python
Module - 2 ASSIGNMENT: Please Implement by Using Python
Module - 2 ASSIGNMENT: Please Implement by Using Python
Data Types
Please implement by using Python.
list1=["name",10,10.5,"2i+j"]
list2=["lalith",20,30.5,"3i+j"]
list3=list1+list2
print(list3)
B) countOfelement=d.count('lalith')
countOfelement1=d.count(True)
list3.reverse()
print(list3)
1. 2) Create 2 Sets containing integers (numbers from 1 to 10 in one set and 5 to 15 in other set)
a. Find the common elements in above 2 Sets.
b. Find the elements that are not common.
c. Remove element 7 from both the Sets.
Set1={1,2,3,4,5,6,7,8,9,10}
Set 2={4,5,6,7,8,9,10,11,12,13}
Set3=set1.intersection(set2)
Qset=set1 ^ set2
Uset=set2.remove(12)
1. Create a data dictionary of 5 states having state name as key and number of covid-19 cases as
values.
a. Print only state names from the dictionary.
b. Update another country and it’s covid-19 cases in the dictionary.
dictKeys=dict1.keys()
dict2={'Mexico':760000}
dict1.update(dict2)
Operators
Please implement by using Python
A. a/=b
B. c*=5
a=5
b=3
c=a%b
print(c)
a1=-5
b1=3
c1=a1%b1
print(c1)
a=5
b=3
c=10
digit1=4
digit2=3
pow_digit=4**3
pow_digit1=pow(4,3)
a=”name”
del a
print(a)