Question: 1. In python 3 what does // operator do? a) integer division b) float division c) returns remainder d) same as a* *b 2. What

1. In python 3 what does // operator do? a)1. In python 3 what does // operator do? a)
1. In python 3 what does // operator do? a) integer division b) float division c) returns remainder d) same as a* *b 2. What is the output of print (73 % 7) a) To 3. Suppose t - (1, 2, 4, 3), which of the following is incorrect? b) 131 = 45 c) print (max (t) d) print (len (t) ch of the following statements produces ("a', 'b', 'c'} ? a) list (abac") b) tuple ("abac" ) c) set ("abac") d) None 5. What will be displayed by the following code? d - ("esc" : 101, "phy" : 201} print (list (d.keys()) 1) ['ese", "phy"] c) (101. 201)' Pay":201] d) ("esc": 201, "phy':201) 6. Given the following code segment: *-0 while (x bi print ('Hello') How many times will Hello be displayed? ajo b)6 7. Given the following code segment: a-0 while (a 0: if y> 0. print ("x > 0 and y > 0") clif z> 0: print ("x 0") O and y > 0 nothing displayed 13. What is displayed when the following program is run? try: list - 10* [0] print ("Done" except IndexError: print ("Index out of bound") else. print("Nothing is wrong") print ('Finally we are here") a)"Done" followed by "Nothing is wrong" b) "Done" followed by "Nothing is wrong" followed by "Finally we are here" c) "Index out of bound" followed by "Nothing is wrong" followed by "Finally we are here " d) "Nothing is wrong" followed by "Finally we are here" 14. courses = ['physics', 'biology', 'chemistry', 'technology"] courses.reverse() print(courses) it is the output? a) ['physics', 'biology', 'chemistry', "technology" b) ['biolgy', 'chemistry', 'physices', 'techhnolgy" c) ['technology', ' physics', 'chemistry', 'biology" d) ['technology', 'chemistry', 'biology', 'physics'] 15. What will be displayed by the following code? def fi( ): global x print(x) f10 print(x) d) 3 3Thinking [20 marks): 16) Draw a owchart to generate a random password of 8 characters. Each time the program is run, a new password will be generate randomly. The pas swords generated will be 8 characters long and will have to include the following characters in any order: (10 marks) > 2 uppercase letters from A to Z > 2 lowercase letters from a to Z > 2 digits from 0 to 9 > 2 punctuation signs such as !, ?, \

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!