Tag: Ireland
-
Python Multiple Choice Questions – Tuples
Python Multiple Choice Questions & Answers (MCQs) focuses on “Tuples”. Q 1. Which of the following is a Python tuple?A. [1, 2, 3]B. (1, 2, 3)C. {1, 2, 3}D. {} Show Answer Answer:-B. (1, 2, 3) Explanation Tuples are represented with round brackets. Q 2. Suppose t = (1, 2, 4, 3), which of the…
-
Python Questions and Answers – Tuples – 2
Python Multiple Choice Questions & Answers (MCQs) focuses on “Tuples – 2”. Q 1. What is the data type of (1)?A. TupleB. IntegerC. ListD. Both tuple and integer Show Answer Answer:-B. Integer Explanation A tuple of one element must be created as (1,). Q 2. If a=(1,2,3,4), a[1:-1] is _________A. [2,3]B. (2,3)C. (2,3,4)D. Error, tuple…
-
Python Questions and Answers – List Comprehension – 2
Python Multiple Choice Questions & Answers (MCQs) focuses on “List Comprehension – 2”. Q 1. Read the information given below carefully and write a list comprehension such that the output is: [‘e’, ‘o’] w=”hello” v=(‘a’, ‘e’, ‘i’, ‘o’, ‘u’) A. [x for w in v if x in v]B. [x for x in v if…
-
Python Questions and Answers – List Comprehension – 1
Python Multiple Choice Questions & Answers (MCQs) focuses on “List Comprehension – 1”. Q 1. What will be the output of the following Python code? l=[1,2,3,4,5] [x&1 for x in l] A. [1, 1, 1, 1, 1]B. [1, 0, 1, 0, 1]C. [1, 0, 0, 0, 0]D. [0, 1, 0, 1, 0] Show Answer Answer:-B.…
-
PHP Multiple Choice Questions – Array
PHP Multiple Choice Questions & Answers (MCQs) focuses on “Array”. Q 1. PHP’s numerically indexed array begin with position ___________A. 0B. 1C. 2D. -1 Show Answer Answer:-A. 0 Explanation Like all the other programming languages, the first element of an array always starts with ‘0’. Q 2. Which of the following are correct ways of…
-
Python Multiple Choice Questions – List Comprehension
Python Multiple Choice Questions & Answers (MCQs) focuses on “List Comprehension”. Q 1. What will be the output of the following Python code snippet? k = [print(i) for i in my_string if i not in “aeiou”] A. prints all characters of my_string that aren’t vowelsB. prints all the consonants in my_stringC. prints all the vowels…
-
C++ Programming Questions and Answers – Abstract Classes – 2
C++ Programming Multiple Choice Questions & Answers (MCQs) focuses on “Abstract Classes – 2”. Q 1. What is an abstract class in C++?A. Class specifically used as a base class with at least one virtual functionsB. Class specifically used as a base class with at least one pure virtual functionsC. Class from which any class…
-
CSS Questions & Answers – Miscellaneous
CSS Multiple Choice Questions & Answers (MCQs) focuses on “Miscellaneous”. Q 1. Which of the following is not a combinatory?A. *B. >C. ~D. + Show Answer Answer:-A. * Explanation Combinator explains the relationship between the selectors. There are four combinators in CSS, child selector (>), adjacent sibling selector(+), general sibling selector(~), descendent selector (space). Q…
-
CSS Questions & Answers – Sliding Doors & Clipped Sliding Doors
CSS Multiple Choice Questions & Answers (MCQs) focuses on “Sliding Doors & Clipped Sliding Doors”. Q 1. Which of the following does not support the “:hover” pseudoclass?A. IE 6B. ChromeC. OperaD. Safari Show Answer Answer:-A. IE 6 Explanation IE 6 does not support the “:hover” pseudoclass on elements other than anchor tags. To get hover…
-
CSS Questions & Answers – Table Graphs, 2D Transforms, Boxing of Images & Constrained Images
CSS Multiple Choice Questions & Answers (MCQs) focuses on “Table Graphs, 2D Transforms, Boxing of Images & Constrained Images”. Q 1. What is the default value of object-fit?A. coverB. containC. fillD. none Show Answer Answer:-C. fill Explanation Object-fit has can be set with five values. When set to the value fill, it is the default…