Data Science · Python Which of the following methods is used to retrieve the fractional and integer parts of a float separately? A frac() B modf() Correct answer C fraction() D split() MCQSEXAM Show answer Read explanation
Data Science · Python What will be the result of 0.1 + 0.2 == 0.3 in Python? A True B False Correct answer C Error D Undefined MCQSEXAM Show answer Read explanation
Data Science · Python Which of the following statements about integer division in Python 3.x is true? A Integer division always rounds down the result. Correct answer B Integer division always rounds up the result. C Integer division returns a float. D Integer division is not supported in Python 3.x. MCQSEXAM Show answer Read explanation
Data Science · Python What is the output of 2 ** 3 ** 2 in Python? A 64 B 512 Correct answer C 81 D 729 MCQSEXAM Show answer Read explanation
Data Science · Python What will be the output of {'a': 1, 'b': 2}.values() in Python? A [1, 2] Correct answer B {'a': 1, 'b': 2} C (1, 2) D Error MCQSEXAM Show answer Read explanation
Data Science · Python Which method is used to update a dictionary with elements from another dictionary or iterable? A update() Correct answer B merge() C append() D extend() MCQSEXAM Show answer Read explanation
Data Science · Python What will be the result of {1, 2, 3} & {3, 4, 5} in Python? A {1, 2} B {3} Correct answer C {3, 4, 5} D Error MCQSEXAM Show answer Read explanation
Data Science · Python Which of the following methods removes all elements from a set in Python? A remove() B clear() Correct answer C pop() D discard() MCQSEXAM Show answer Read explanation
Data Science · Python What will be the result of ('a', 'b') + ('c',) in Python? A ('a', 'b', 'c') Correct answer B ('a', 'b', 'c', 'd') C ('a', 'b', 'd', 'c') D Error MCQSEXAM Show answer Read explanation
Data Science · Python Which of the following methods returns the number of occurrences of a specified value in a tuple? A count() Correct answer B index() C get() D len() MCQSEXAM Show answer Read explanation
Data Science · Python What will be the result of ['a', 'b', 'c'] * 2 in Python? A ['a', 'b', 'c', 'a', 'b', 'c'] Correct answer B [['a', 'b', 'c'], ['a', 'b', 'c']] C ['aa', 'bb', 'cc'] D Error MCQSEXAM Show answer Read explanation
Data Science · Python Which of the following methods removes the first occurrence of a specific value from a list in Python? A pop() B remove() Correct answer C del() D clear() MCQSEXAM Show answer Read explanation
Data Science · Python Which of the following statements about strings in Python is true? A Strings can contain both letters and numbers. Correct answer B Strings are mutable. C Strings can only contain ASCII characters. D Strings can be represented using single quotes but not double quotes. MCQSEXAM Show answer Read explanation
Data Science · Python Which of the following statements about booleans in Python is true? A Booleans are represented as 1 and 2. B Booleans can only be assigned with the True keyword. C Booleans are a subclass of integers. Correct answer D Booleans cannot be used in conditional statements. MCQSEXAM Show answer Read explanation
Data Science · Python What is the result of True or False in Python? A True Correct answer B False C 1 D 0 MCQSEXAM Show answer Read explanation
Data Science · Python What is the result of "hello".upper() in Python? A "hello" B "HELLO" Correct answer C "Hello" D Error MCQSEXAM Show answer Read explanation
Data Science · Python Which of the following statements about integers in Python is true? A Integers can have leading zeros. B Integers can have a decimal point. C Integers can be represented in binary format. Correct answer D Integers can contain letters. MCQSEXAM Show answer Read explanation
Data Science · Python What is the result of abs(-5) in Python? A 5 Correct answer B -5 C 0 D Error MCQSEXAM Show answer Read explanation
Data Science · Python Which of the following statements about floats in Python is true? A Floats cannot represent negative numbers. B Floats have infinite precision. C Floats are always displayed with a fixed number of decimal places. D Floats can be used to represent fractions accurately. Correct answer MCQSEXAM Show answer Read explanation
Data Science · Python What is the result of round(3.75) in Python? A 4.0 Correct answer B 3.75 C 3 D Error MCQSEXAM Show answer Read explanation
Data Science · Python What will be the output of len({'a': 1, 'b': 2, 'c': 3}) in Python? A 1 B 2 C 3 Correct answer D Error MCQSEXAM Show answer Read explanation
Data Science · Python Which method is used to retrieve all keys from a dictionary in Python? A keys() Correct answer B values() C items() D get() MCQSEXAM Show answer Read explanation
Data Science · Python What will be the result of len(['apple', 'banana', 'orange']) in Python? A 3 Correct answer B 6 C 7 D Error MCQSEXAM Show answer Read explanation
Data Science · Python Which of the following statements about tuples is true? A Tuples can be modified after creation. B Tuples use curly braces {} for declaration. C Tuples support duplicate elements. Correct answer D Tuples can only contain integers. MCQSEXAM Show answer Read explanation
Data Science · Python What will be the result of len({1, 2, 3, 4, 5}) in Python? A 1 B 5 Correct answer C 0 D Error MCQSEXAM Show answer Read explanation