Module 2 Data Types, Operators, Variables Assignment
Module 2 Data Types, Operators, Variables Assignment
Data Types
Please implement it by using Python.
1. Construct 2 lists containing all the available data types (integer, float, string, complex and
Boolean) and do the following..
a. Create another list by concatenating above 2 lists
b. Find the frequency of each element in the concatenated list.
c. Print the list in reverse order.
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.
3. 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 its covid-19 cases in the dictionary.
Operators
Please implement by using Python
A. a/=b
B. c*=5
3. A. How to check the presence of an alphabet ‘S’ in the word “Data Science” .