print(“I†+ “am†+ “in†+ “schoolâ€) display ___
1.I am in school
2.I Am In School
3.Iaminschool
4.iaminschool
Which of the following statement is correct syntactically ?
1.print(“Hello†, sep == ‘@’ , end = ‘ ‘)
2.print(“Hello†, sep = ‘@’ , end = ‘ ‘)
3.Print(“Hello†, sep = ‘@’ , end = ‘ ‘)
4.print(“Hello†, sep = ‘@’ , end = ‘ ‘
>>> 14 + 2 ** 2 evaluates to
1.256
2.18
3.28
4.32
>>> 15.0 / 4 + (8 + 3.0) evaluates to ________________
1.14.75
2.14
3.15
4.None of the above
>>> 15.0 / 4 + (8 + 3.0) evaluates to ________________
1.14.75
2.14
3.15
4.None of the above
>>> 15.0 / 4 + (8 + 3.0) evaluates to ________________
1.14.75
2.14
3.15
4.None of the above
>>> bool(0) evaluates to __
1.False
2.True
3.Error
4.None of the above
Aman wants to find the average of two numbers 10 and 12 and he write the code as 10 + 12/2, it would run successfully but the output is not correct. What type of error is done by Aman?
1.Syntax error
2.Logical error
3.Runtime error
4.None of the above
Binary operators are operators with ________ operands
1. 1
2.2
3.3
4.4
Errors in program is also called ____
1.virus
2.bug
3.beetle
4.val
Fill in the blank in given code : print("The total in Rs." + __________(70))
1.int
2.float
3.str
4.bool
IDLE stands for __________
1. Integrated Development LEarning
2.Integrated Development Learning Environment
3.Intelligent Development Learning Environment
4.None of the above
IDLE stands for __________
1. Integrated Development LEarning
2.Integrated Development Learning Environment
3.Intelligent Development Learning Environment
4.None of the above
In given code _____________ conversion takes place. num1 = 100 num2 = 2.0 sum1 = num1 + num2 print(sum1)
1.implicit
2.explicit
3.hybrid
4.None of the above
In Python, we have ____________________ function for taking input from the user.
1.input( )
2.accept( )
3.c. enter( )
4.insert( )
In the given code, an integer value stored in variable num1 is added to a float value stored in variable num2, and the result is stored in variable sum1. This is an example of _____ sum1 = num1 + num2
1.implicit conversion
2.explicit conversion
3.data conversion
4.value conversion
int(123.45) is an example of _
1.explicit conversion
2.implicit conversion
3.quick conversion
4.None of the above
print(“I†, “am†, “in†, “schoolâ€) display __
1.I am in school
2.I Am In School
3.Iaminschool
4.iaminschool
Python uses _________________ function to output data to standard output device.
1.print( )
2.display( )
3.output( )
4.None of the above
Ravi is writing a program of printing “Hello World†but he forgot to close the bracket of print( ) function (as shown below). What type of error is this? print("Hello World"
1.Syntax error
2.Logical error
3.Runtime error
4.None of the above
The process of removing errors from programs is called _________
1.Programming
2.Documentation
3.Debugging
4.None of the above
The user may enter a number or a string but the input() function treats them as _
1.integer only
2.list
3.strings only
4.tuple
What type of error is returned by following statement? >>> age = input("Enter your age: ") Enter your age: 3 >>> age + 3
1.SyntaxError
2.IndexError
3.ValueError
4.TypeError
Which of the following error may encounter in program of python?
1.Syntax error
2.Logical error
3.Runtime error
4.All the above
Which of the following function convert the data type of variable ‘x’ from float to integer?
1.float( )
2.int( )
3.str( )
4.num( )
Which of the following is explicit type conversion function in Python?
1.int( )
2.str( )
3. float( )
4.All the above
Which of the following is invalid expression?
1.250
2. 32 / 4 + 7
3.“Global†+ “Citizenâ€
4.in
Which of the following is mutable data type?
1.string
2.Tuple
3.List
4.All the above
Which of the following is parameter of print( ) function?
1.sep
2.end
3.Both of the above
4.None of the above
Which of the following is valid membership operator?
1.in
2.not in
3.Both of the above
4.None of the above
Which of the following statement is correct to initialize multiple variables?
1.a = b = c = 85
2.a = b and c = 85
3.a = 85 , c = 85 , b =85
4.All the above
Which of the following statement return run time error ?
1.Divide any number by zero
2.Adding any number to zero
3.Subtracting any number from zero
4.Multiply any number with zero
Which operators can be used to determine whether two variables are referring to the same object or not.
1.Relational
2.Logical
3.Identity
4.Membership
Write the output of following code: >>> n1 = 5 >>> n2 = n1 >>> n2 is n1
1.True
2.False
3.Error
4.5
Write the output of the following : >>> age = input("Enter your age: ") >>> type(age)
1.<class ‘int’>
2.<class ‘str’>
3.<class ‘list’>
4.None of the above
Write the output of the following : >>> age = input("Enter your age: ") Enter your age: 3 >>> age * 3
1.9
2.333
3.33
4.Error
Write the output of the following : 22 + (7 -2 // 9 ** 2) a. 22 b. 7 c. 29 d. 0
1.22
2.7
3.29
4.0
Write the output of the following : num1 = 100 num2 = 2.0 sum1 = num1 + num2 print(sum1)
1.102
2.102.0
3.Error
4.None of the above
Write the output of the following : print(3 and (5 or 0))
1.3
2.5
3.True
4.False
Write the output of the following : print(True and (False or True))
1.True
2.False
3.Error
4.None of the above
Write the output of the following : print(true and False)
1.True
2.False
3.Error
4.None of the above
Write the output of the following code : print((15 // 2 ** 2) * 'A')
1.3
2.Error
3.AAA’
4.4
___ error causes abnormal termination of program while it is executing.
1.Syntax error
2.Logical error
3.Runtime error
4.None of the above
___ produces an undesired output but without termination of the program. a. Syntax error b. Logical error c.
1. Syntax error
2.Logical error
3.Runtime error
4.None of the above
____ operators are used to check if a value is a member of the given sequence or not.
1.Logical
2.Identity
3.Membership
4.Relational
________ happens when data type conversion is done automatically by Python.
1.Implicit conversion
2.Explicit conversion
3.Both of the above
4.None of the above
_________ is defined as a combination of constants, variables, and operators.
1.Statement
2.Expression
3.Operation
4.None of the above