Module 2 Data Types, Operators, Variables Assignment
Module 2 Data Types, Operators, Variables Assignment
ASSIGNMENT
Please do not use GenAI (e.g. ChatGPT) for solving assignments and do not copy and paste from the
internet. Understand the solution using GenAI or the internet if you want to but you have to answer in
your own words. Also do not copy solutions from your friends or batchmates.
Our plagiarism tool on LMS will identify such things and make a record that you are following unethical
means to solve assignments. Without any notice we shall just discard your name from any internship or
job assistance from our side.
Ethics is the number one quality which we all must possess. Thank You
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.
A. a/=b
B. c*=5
3. A. How to check the presence of an alphabet ‘S’ in the word “Data Science” .
Variables
Please implement by using Python