click below
click below
Normal Size Small Size show me how
IT0011-FA2
Integrated Programming
| Question | Answer |
|---|---|
| Integer is positive or negative whole numbers. | True |
| Float are a subtype of integers. | False |
| A sequence of operands and operators. | Expression |
| Membership operators are used to test if a sequence is presented in an object. | True |
| Given the code below: i=1 while i < 5: print(i, end =' ', flush = True) i += 1 What will be the output? | 1234 |
| The if statement iterates over a sequence of objects. | False |
| Statement stop the current iteration of the loop and continue with the next. | continue |
| Assignment operators are used to compare two values. | False |
| Given the code below: x = 10 x% = 5 print (x) What will be the output? | 0 |
| What operators are used with numeric values to perform common mathematical operations? | Arithmetic |
| Statement stop the loop before it has looped through all the items. | break |
| What signifies the end of a statement block or suite in Python? | A line that is indented less than the previous line |
| Float are a subtype of integers. | False |
| A Tuple object is an ordered collection of one or more data items, not necessarily of the same type, put in square brackets. | False |
| Given the code below: num = 14 if num < 20: print ("Under ") else: print ("Over ") print ("the limit.") What will be the output? | Under the limit. |
| Given the code below: i=2 while i < 10: print(i, end =' ', flush = True) i += 1 What will be the output? | 23456789 |
| The range() function defaults to increment the sequence by 1. | True |
| Given the code below: for i in range(1,10): if i%2: continue print(i, end=' ', flush=True) What will be the output? | 2468 |
| Objects have no fields that can be changed after the object is created. | Immutable |
| What is the output of the given python script: type(3.45) | <class ‘float’> |
| Arithmetic operators are used with numeric values to perform common mathematical operations. | True |
| What is the output given the following python script: >>> 3.5 + 2 * 3 | 9.5 |
| Given the code below: x = [“one”, “two”, “three”] print (“three” in x) What will be the output? | True |
| While loop statement execute a set of statements as long as a condition is true. | True |
| A collection of one or more characters put in single or double quotes. | String |
| Python supports many operators for combining data objects into expressions | True |
| Given the code below: a = 1; b = 2; c = 3; d = 4 x = a + b * c - d Which operation will be evaluated second? | a + b |
| xrange() returns an iterator that provides the same functionality more efficiently. | True |
| For loop statement execute a set of statements as long as a condition is true. | False |
| Statement execute a set of statements as long as a condition is true. | while |
| The loop statement is used to check a condition. | False |
| If statement execute a set of statements as long as a condition is true. | False |
| Statement iterates over a sequence of objects. | for |
| Function returns an iterator that provides the same functionality more efficiently. | xrange() |
| Float is positive or negative whole numbers. | False |
| String are sequence of character data. | True |
| In Python statement x = a + 3 - b: a + 3 - b is | expression |
| What is the output given the following python script: >>> 10%2 | 0 |
| Given the code below: i=1 while i < 5: print(i, end =' ', flush = True) i += 1 What will be the output? | 1234 |
| Data with one of two built-in values True or False. | Boolean |
| Positive or negative whole numbers (without a fractional part). | Integer |
| What is the correct symbol of comments in Python? | # |
| Given the code below: x = 10 x% = 5 print (x) What will be the output? | 0 |
| Python supports many operators for combining data objects into expressions. | True |
| What is the output given the following python script. >>> 3 + 2 ** 3 | 11 |
| Given the code below: x = 10 y = 10 x is y What will be the output? | True |
| The if statement is used to check a condition. | True |
| Break statement stop the loop before it has looped through all the items. | True |
| Break statement stop the current iteration of the loop, and continue with the next. | False |
| Continue statement stop the loop before it has looped through all the items. | False |
| Given the code below: i=2 while i < 10: print(i, end =' ', flush = True) i += 1 What will be the output? | 23456789 |
| Given the code below: x=0 while (x < 80): x += 2 print(x, end =' ', flush = True) What will be the output? | 80 |
| What is the output of the given python script: type(‘abc’) | <class ‘str’> |
| What is the output of the given python script: type({6:”six”, 7:”seven”, 8:”eight”}) | <class ‘dict’> |
| What is the output of the given python script: type(‘hello’) | <class ‘str’> |
| Any real number with a floating point representation in which a fractional component is denoted by a decimal symbol or scientific notation. | Float |
| What is the output given the following python script. >>> 10 / 2 + 2 * 3 | 11.0 |
| Which of the following operators does not belong to the group? | Compound |
| Assignment operators are used with numeric values to perform common mathematical operations. | False |
| Given the code below: for i in range(1,10): if i%2: continue print(i, end=' ', flush=True) What will be the output? | 2468 |
| The for statement iterates over a sequence of objects. | True |
| Given the code below: i=1; j = 1 while i < 8: print(j, end =' ', flush = True) i += j j = i - j What will be the output? | 1123 |
| Given the code below: for i in range(1, 6): print(i, end=' ', flush=True) | 12345 |