Assuming that the following snippet has been successfully executed, which of the equations are True? (Select two answers)

Assuming that the following snippet has been successfully executed, which of the equations are True? (Select two answers) A . len(a) == len (b)B . b [0] +1 ==a [0]C . a [0] == b [0]D . a [0] + 1 ==b [0]View AnswerAnswer: AC Explanation:

September 25, 2020 No Comments READ MORE +

And operator able to perform bitwise shifts is coded as (Select two answers)

And operator able to perform bitwise shifts is coded as (Select two answers)A . -­B . ++C . <<D . >>View AnswerAnswer: CD Explanation: Reference: https://www.geeksforgeeks.org/basic-operators-python/

September 25, 2020 No Comments READ MORE +

What is the expected behavior of the following code?

What is the expected behavior of the following code? It will:A . print 4321B . print <generator object f at (some hex digits)>C . cause a runtime exceptionD . print 1234View AnswerAnswer: B Explanation:

September 25, 2020 No Comments READ MORE +

What is the expected output of the following snippet?

What is the expected output of the following snippet? A . the code is erroneousB . 3C . 7D . 15View AnswerAnswer: A

September 23, 2020 No Comments READ MORE +

Which of the following statements are true? (Select two answers)

Which of the following statements are true? (Select two answers)A . Python strings are actually listsB . Python strings can be concatenatedC . Python strings can be sliced like listsD . Python strings are mutableView AnswerAnswer: BC Explanation: Reference: https://docs.python.org/2/tutorial/introduction.html

September 23, 2020 No Comments READ MORE +

What is the expected behavior of the following snippet?

What is the expected behavior of the following snippet? It will:A . cause a runtime exception on line 02B . cause a runtime exception on line 01C . cause a runtime exception on line 03D . print 3View AnswerAnswer: D Explanation:

September 23, 2020 No Comments READ MORE +

Assuming that String is six or more letters long, the following slice is shorter than the original string by:

Assuming that String is six or more letters long, the following slice is shorter than the original string by:A . four charsB . three charsC . one charD . two charsView AnswerAnswer: A

September 22, 2020 No Comments READ MORE +

What can you do if you don’t like a long package path like this one?

What can you do if you don’t like a long package path like this one? A . you can make an alias for the name using the alias keywordB . nothing, you need to come to terms with itC . you can shorten it to alpha . zeta and Python...

September 22, 2020 No Comments READ MORE +

Which of the following sentences are true? (Select two answers)

Which of the following sentences are true? (Select two answers)A . Lists may not be stored inside tuplesB . Tuples may be stored inside listsC . Tuples may not be stored inside tuplesD . Lists may be stored inside listsView AnswerAnswer: BD Explanation: Reference: https://www.afternerd.com/blog/python-lists-for-absolute-beginners/

September 22, 2020 No Comments READ MORE +

You need data which can act as a simple telephone directory. You can obtain it with the following clauses (Select two relevant variants; assume that no other items have been created before)

You need data which can act as a simple telephone directory. You can obtain it with the following clauses (Select two relevant variants; assume that no other items have been created before)A . dir={‘Mom’: 5551234567, ‘Dad’: 5557654321}B . dir= {‘Mom’: ‘5551234567’, ‘Dad’: ‘5557654321’}C . dir= {Mom: 5551234567, Dad: 5557654321}D ....

September 21, 2020 No Comments READ MORE +