CUET LEVEL 2  CHAPTER STACK

CUET LEVEL 2 CHAPTER STACK

12th Grade

15 Qs

quiz-placeholder

Similar activities

List Review

List Review

9th - 12th Grade

11 Qs

CPM9.1-9.3 Quiz Review

CPM9.1-9.3 Quiz Review

9th - 12th Grade

15 Qs

CodeHS Basic Data Structures in Python

CodeHS Basic Data Structures in Python

9th Grade - University

10 Qs

Python Unit  8 Quiz

Python Unit 8 Quiz

9th - 12th Grade

15 Qs

Python lists and tuples

Python lists and tuples

12th Grade

10 Qs

list in python

list in python

12th Grade

19 Qs

PYTHON BASIC 8 - 9

PYTHON BASIC 8 - 9

12th Grade

10 Qs

05/25/2021 - CS

05/25/2021 - CS

10th - 12th Grade

10 Qs

CUET LEVEL 2  CHAPTER STACK

CUET LEVEL 2 CHAPTER STACK

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Bodhi School

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the position of the "Andheri" in the following list:

names=[Bandra, Thene, Andheri, Colalk"]

0

1

2

3

Answer explanation

Andheri appears 3rd in the list but indecing starts from 0 so names [2] will display Andheri

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What output will this code produce?

colours. append("blue")

colours. append("green")

colours. append("red")

print(colours[2])

blue

green

red

error

Answer explanation

Three colours are appended as blue, green, red. The red colour is at the 3rd position and according to indecing at the 2nd position so print (colours[2]) will displays red as its output.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what would this code do?

list=['Delhi', 'Mumbai', 'Chennai',' Kolkata']

print (list. pop())

Remove 'Kolkata' from the list

Remove 'Delhi' from the list

Remove 'Kolkata' from the list and print it out to the shell

An error

Answer explanation

The function pop() returns the elements from the list whole removing it from the list. Thus it removes Kolkata from the list & prints it out of the shell

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which colour will be replaced with yellow?

colour=["red", "green", "blue" ]

colour[1]="yellow"

print(colour)

red

green

blue

none, yellow will be added to the list

Answer explanation

In the existing list colour[1] belongs to green . so after colour [1]="yellow" the new list will be colour=["red", "yellow", "blue"]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

This list contains items of what data type? list=[1,4,6]

string

boolean

float

interger

Answer explanation

String means a sequence of character, Boolean means True or False Float means decimal numbers like 13.2 , 45.6. etc and Integers means 1,2, -7, etc. Thus the list contains integers

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbols are used to open and close a list?

( ) round brackets

{ } curly brackets

[ ] square brackets

" " speech marks

Answer explanation

The square brackets [ ] are used to enclose the items of the list

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The prefix form of A-B/(C * D^ E) is

-/*ACBDE

-A/B* C ^ DE

-ABCD*^DE

-A/BC*^DE

Answer explanation

The solution of infix expression A-(B/C*D^E)) to prefix is : -A(B/(C*D^E))

-A/B*C^DE. Thus prefix expression is -A/B*C^DE

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?