wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Geeks for Geeks PCCOER Info Session CP Quiz

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which data type is used to store integer data type

a)

float

b)

char

c)

int

d)

double

2.

Which of the following is not Object Oriented Programming Language (OOP)

a)

C++

b)

C

c)

JAVA

d)

PYTHON

3.

Which of the following is not an type of Error?

a)

Run time Error

b)

Syntax Error

c)

Compile Time Error

d)

True Error

4.

Python interpretter is based on which language?

a)

c++

b)

Assembly

c)

c

d)

c#

5.
  1. What will be the output of 'geeks' [-3]?

a)

g

b)

k

c)

s

d)

e

6.

I am a function used to turn all characters of a string to uppercase, who am I?

a)

toupper()

b)

Caps()

c)

upper()

d)

AllCaps()

7.

Which of the following data type is Mutable, Allows duplicates and Ordered?

a)

Tuple

b)

Sets

c)

Lists

d)

Dictionary

8.

What are the 3 arguments taken by the range function in a for loop?

(i.e. for i in range())

a)

(Start, end, increment)

b)

(Increment, Jump, End)

c)

(End, Start, Increment)

d)

(Increment, Start, End)

9.

What is the output of the following code?

x = 50

def fun1():

x = 25

print(x)

fun1()

print(x)

a)

25

50

b)

50

50

c)

25

25

d)

Compliation Error

10.
  1. Which of the following loops is not present in python?

a)

while

b)

do-while

c)

for

d)

else

11.

Which of the following is not a python library?

a)

NumPy

b)

Eigen

c)

Pandas

d)

Tensor Flow

12.

Which of the following character is used to give single-line comments in Python?

a)

//

b)

#

c)

!

d)

/*

13.

What is the Java syntax to find length of a given string 'str'?

a)

len(str);

b)

str.len();

c)

str.length();

d)

size(str);

14.

What is the output of the following code?

int x=10;

int y=25;

x++;

y--;

print(x)

print(y)

a)

11

24

b)

10

24

c)

11

25

d)

Compliation Error

15.

Which of the following is not a c++ compiler?

a)

gnu

b)

clang

c)

minGW

d)

G95

16.

What will be the output of the following code snippet?

print(type(5 / 2))

print(type(5 // 2))

a)

int,str

b)

float,int

c)

double,int

d)

float,float

17.

Correct syntax for defining a function in python is:

a)

def function_name(arguments):

b)

function(function_name):

c)

Return_type function_name(arguments){

d)

func function_name(arguments):

18.

Which of the following is immutable in python

a)

{a:1,b:2,c:3}

b)

{1,2,3}

c)

[1,2,3]

d)

(1,2,3)

19.

Which of the following is not an Keyword

a)

hello

b)

void

c)

int

d)

double

20.

Which of the following Data Structure uses LIFO?

a)

Stack

b)

Queue

c)

Tree

d)

Graph