Which of the following variable names are illegal? (Choose two.)

Which of the following variable names are illegal? (Choose two.)A . TrueB . trueC . andD . TRUEView AnswerAnswer: AC

March 22, 2025 No Comments READ MORE +

What is the expected output of the following code?

What is the expected output of the following code? print(3 * 'abc' + 'xyz')A . 3abcxyzB . abcabcxyzxyzC . abcabcabcxyzD . abcxyzabcxyzabcxyzView AnswerAnswer: C

March 22, 2025 No Comments READ MORE +

What is the expected output of the following code?

What is the expected output of the following code? print (1 // 2)A . 0.5B . 0.0C . None of the above.D . 0View AnswerAnswer: D

March 20, 2025 No Comments READ MORE +

What is the output of the following snippet?

What is the output of the following snippet? A . [1, 2, 3, 1, 2, 3]B . [3, 2, 1, 1, 2, 3]C . [1, 1, 1, 1, 2, 3]D . [1, 2, 3, 3, 2, 1]View AnswerAnswer: C

March 20, 2025 No Comments READ MORE +

What is the expected output of the following code?

What is the expected output of the following code? x = 4.5 y = 2 print (x // y)A . 2.5B . 2C . 2.25D . 2.0View AnswerAnswer: D

March 18, 2025 No Comments READ MORE +

What is the output of the following snippet?

What is the output of the following snippet? A . 2B . 4C . The snippet is erroneous (invalid syntax)View AnswerAnswer: B

March 17, 2025 No Comments READ MORE +

Assuming that the tuple is a correctly created tuple, the fact that tuples are immutable means that the following instruction:

Assuming that the tuple is a correctly created tuple, the fact that tuples are immutable means that the following instruction: A . is illegalB . may be illegal if the tuple contains stringsC . can be executed if and only if the tuple contains at least two elementsD . is...

March 17, 2025 No Comments READ MORE +

What is the expected output of the following code?

What is the expected output of the following code? x = 1 // 5 + 1 / 5 print(x)A . 0B . 0.2C . 0.0D . 0.4View AnswerAnswer: B

March 17, 2025 No Comments READ MORE +

What is the expected output of the following code?

What is the expected output of the following code? A . 2B . 1C . The code is erroneous.D . 3E . 4View AnswerAnswer: C

March 16, 2025 No Comments READ MORE +

Which one of the lines should you put in the snippet below to match the expected output?

Which one of the lines should you put in the snippet below to match the expected output? Expected output: Code: A . sorted(list)B . sort(list)C . list.sort()D . list.sorted()View AnswerAnswer: C

March 15, 2025 No Comments READ MORE +