Prutor Python Quiz 4 by anupmaurya June 13, 2021 written by anupmaurya 0 minutes read 331 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”] None 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} None 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 None 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 None 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 None Time's up 0 FacebookTwitterPinterestEmail anupmaurya "Hi there, My name is Anup Maurya. I have a passion for programming and previously worked at TCS, one of the best global IT services and consulting companies, as a System Administrator. I also enjoy graphic design. It's a pleasure to have you here." previous post Prutor Python Quiz 9 next post Pructor Python Quiz 10 Leave a Comment Cancel Reply