Prutor Python Quiz 4 by anupmaurya June 13, 2021 written by anupmaurya June 13, 2021 208 Welcome to your Prutor Python Quiz 4 How do you declare a dictionary in python? a) dict [“key”:”value”] b) dict = {“key”:”value”} c) Dict = {“key” - “value”} d) Dict = [“key”:”value”] What will be the output of the following code: dict = { x:x for x in range(1,2) } print(dict) a) {} b) {x:x,x:x,x:x} c) {1: 1, 2: 2} d) {1: 1} In python 3.x, Which of the following statement is true for the following code: age = input (“Please enter your age”) a) Age will be an integer type. b) It removes trailing spaces. c) age variable's type will be Whatever type is given to it d) None of the above What will be the output of the following program ? int =5 while int <=-1: print (int) int = int -1 a) 3 2 b) blank(nothing will be printed) c) 5 4 3 d) 5 4 3 2 1 What will be the output of the following program ? int =3while int >=2: print (int) int = 1 a) 3 b) 2 c) 3 2 d) Error in code Time's up 0 comment 0 FacebookTwitterPinterestEmail anupmaurya Hey there, My name is Anup Maurya. I was born with love with programming and worked with TCS. One of best global (IT) services and consulting company as System Administrator . I also love graphics designing. It's my pleasure to have you here. previous post Prutor Python Quiz 9 next post Pructor Python Quiz 10 Leave a Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.