1. What are the two primitive and primitive data structures in…

Question Answered step-by-step 1. What are the two primitive and primitive data structures in… 1. What are the two primitive and primitive data structures in Python? Give one example for each type stating clearly whether it is primitive or not.  2. A text analyst wants to analyze a text file. She wants to find out the total number of commas in the text file. a. Write a detailed algorithm to count the total number of commas(,) in the file. b. Illustrate the problem design with the help of a flowchart. 3. Write a program that prints non-prime numbers from the range [10-20]. Hint: You’ll need to use % modulus operator.  4. Consider the following program: def calculate (value): return value + value def main (): result = 10; result += calculate (10); print (“Result= {}”. format(result)) main() Determine the output of the program upon execution.  5. Given the following code extract, Complete the code such the output is: 11 9 7.  nums = list (range (?,?,?)) print(nums) 6.Consider the following code extract. Observe the output.Image transcription textCode Output i = 7 6 while i > 0 : i -= 1OH N WAD if i == 5: continue print (i)… Show moreNow produce a code which results in the following output:  7. Write a Python program that satisfies the following specification. def my_func(L1, L2): “”” L1 and L2 are lists of integers returns the element-wise product of L1 and L2. E.g., if L1 = [2, 2, 3] and L2 = [7, 5, 6]it returns [14, 10, 18]””” 8.Nested loops. Using nested loops, print the following pattern.Image transcription textA ABA ABCBA ABCDCBAABCDEDCBA… Show more9.Classes. Modify this program to include two more attributes for car and truck and print all the attributes of both vehicles. Image transcription text….. ._…. .’.. u… u… “rug..- ……..’….”””I” ClassVehicle(object): &qu… Show more… Show morea. class Vehicle file attachedb. Write a python source code for a class Movie corresponding to the UML model shown below. The description method should return a string value corresponding to the attributes of a Movie.c. Make two lists for data which has your name and ID number as well as the units you’ve enrolled. The other list has your firend’s information. Find out which units are common in both the lists.  Computer Science Engineering & Technology Python Programming BN 108 Share QuestionEmailCopy link Comments (0)