1) Which of the following is the correct extension of the Python file? a) .py b) .python c) .pyn 2) Which of the following character is used to give single-line comments in Python? a) // b) # c) >>> 3) Amongst which of the following is / are the Numeric Types of Data Types? a) int, float, complex b) str,num,int c) num, int, dict 4) The type() function can be used to get the data type of any object. a) True b) False 5) What is the name of the operator ** in Python? a) Floor division b) Exponentiation c) Modulus 6) Which arithmetic operators can we NOT use with strings? a) * b) + c) - 7) Python is case sensitive a) True b) False 8) Which of the following statements assigns the value 25 to the variable x in Python: a) x << 25 b) x : 25 c) x=25 9) If x=3.123, then int(x) will give ? a) 3 b) 1 c) 3.1 10) Which of the following is not the mode of interacting with python? a) Hybrid b) interactive c) script 11) What will be the data type of the following variable? A = '101' a) str b) int c) float 12) Which of the following assignment will return error? a) a = b = c = 89 b) a=10, b=6 c) a,b,c=12,13,14 13) Variables whose values can be changed after they are created and assigned are called __________________ a) mutable b) immutable c) changeable 14) Which method is used to find the memory location of variable? a) id b) add c) find 15) How to output the string “May the odds favor you” in Python? a) print(“May the odds favor you”) b) echo(“May the odds favor you”) c) System.out(“May the odds favor you”)

Leaderboard

Visual style

Options

Switch template

Continue editing: ?