click below
click below
Normal Size Small Size show me how
IPT MOD2
| Question | Answer |
|---|---|
| Number as identified as real part and imaginary part. | Complex |
| A sequence of operands and operators. | Expression |
| List an unordered collection of data in a key:value pair form. | True |
| What is the output of the given python script: type(‘abc’) | <class ‘str’> |
| Integer numbers are identified as real part and imaginary part. | False |
| A list value is a collection of one or more characters put in single or double quotes. | False |
| String is any real number with a floating point representation in which a fractional component is denoted by a decimal symbol or scientific notation. | False |
| Positive or negative whole numbers (without a fractional part). | Integer |
| Data with one of two built-in value | Boolean |
| What is the output of the given python script: type(“abc”) | <class ‘str’> |
| Syntax error is type of error where the Python could not figure out how to read your program. | True |
| A type of error where the Python could not figure out how to read your program. | Syntax |
| Given the code below: x = 20 y = 25 print (x >= y) What will be the output? | False |
| Membership operators are used to compare (binary) numbers. | False |
| In Python statement x = a + 3 - b: a + 3 - b is | expression |
| Given the code below: x = [“one”, “two”, “three”] print (“three” in x) What will be the output? | True |
| What is the output given the following python script: >>> 3.5 + 2 * 3 | 8.5 |
| What is the output given the following python script: >>> 10%2 | 0 |
| Comparison operators are used to compare two values. | True |
| Given the code below: x = 20 y = 25 x is y What will be the output? | False |
| xrange() returns an iterator that provides the same functionality more efficiently. | True |
| Continue statement stop the loop before it has looped through all the items. | False |
| The range() function defaults to increment the sequence by 1. | True |
| Given the code below: i=1; j = 1 while i < 10: print(j, end =' ', flush = True) i += j j = i - j What will be the output? | 11235 |
| Given the code below: for i in range(-2, -5, -1): print(i, end=' ', flush=True) What will be the output? | -2-3-4 |
| The loop statement is used to check a condition. | False |
| Given the code below: for i in range(1, 4): print(i, end=' ', flush=True) What will be the output? | 123 |
| Given the code below: for i in range(1, 5): print(i, end=' ', flush=True) What will be the output? | 1 2 3 4 |
| In a Python, a control structure: | Directs the order of execution of the statements in the program |