0xDebug - Python

0xDebug - Python

University

10 Qs

quiz-placeholder

Similar activities

Round 2 for Preplacement Bootcamp

Round 2 for Preplacement Bootcamp

University

15 Qs

Internet

Internet

University

11 Qs

ICF-Mechanical-(Theory Quiz-2)

ICF-Mechanical-(Theory Quiz-2)

University

10 Qs

Computer Network

Computer Network

University

10 Qs

HTML Quiz

HTML Quiz

University

10 Qs

Server Administration- Quiz 1

Server Administration- Quiz 1

12th Grade - University

10 Qs

Computer Science (1-9) - Identifying & Preventing Threats

Computer Science (1-9) - Identifying & Preventing Threats

University

11 Qs

Recording Software Button Identification Quiz

Recording Software Button Identification Quiz

8th Grade - University

10 Qs

0xDebug - Python

0xDebug - Python

Assessment

Quiz

Computers

University

Hard

Created by

Suresh King

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The following Code snippet for the function hasCycle, uses hare-tortoise algorithm for detecting cycle in linked list. Read through the code carefully and select the option that is suitable.

There is no issue in the code; it will execute successfully

The ‘while’ condition must be improved by adding some condition

Updating ‘hare’ pointer will directly affect ‘tortoise’ pointer

Line 9 must be updated by “if tortoise == hare”

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The code snippet uses binary search algorithm to check if a value is present in the given list. Identify the options true to make the below code to follow binary search algorithm.

To make this code “binary search” work properly the recursion has to be done with proper parameters. Consider the complexityConsider the format: “ Change at Line 8 | Change at Line 10 “

search(a, mid + 1, last, item)    |    search(a, start, mid – 1, item)

search(a, start, mid – 1, item)  |    search(a, mid + 1, last, item)

search(a, start, mid, item)        |     search(a, mid, last, item)

search(a, mid + 1, last, item)    |     search(a, start, mid, item)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The below question is to check, can we able to reach the last element of the array by starting from 0th index of the array. The index has to be incremented by value in that index position. N is the length of the array. ‘arr_step_count’ array contains values (step count) ranging from 0 <= step_count <= ∞

Is there any possibilities for infinite loop in any case of input list whose element value ranges from 0 <= element_value <=

Yes

No

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The given code is the solution for finding a number is a palindrome or not.

To make the above code work properly, how many changes has to be made:

No error

Three

Two

One

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Read through the following code for Linked List reversal with the following functions.

What must be the order of the lines inside the while loop must follow, to reverse the linked list.

13, 12, 15, 14

14, 12, 15, 13

12, 15, 14, 13

15, 14, 13, 12

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Select the Logical Error in the following Code Snippet for the function multiply_matrices.

There is no error

Array A is accessed wrongly

Array B is accessed wrongly

Array result is accessed wrongly

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Choose the correct output for the below code snippet

2

1

Runtime Exception of Arithmetic Exception

Compilation error due to divisibility by 0

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?