wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

SKILL QUIZ

Total questions: 50

Worksheet time: 50mins

Name
Class
Date
1.

What is the output of the following math function

import math
print(math.ceil(252.4))
print(math.floor(252.4))
a)


252
252

b)
  • 252
    253

c)
  • 253
    252

2.

What is the output of the add() function call

def add(a, b):
         return a+5, b+5

     result = add(3, 2)
print(result)
a)
  • 15

b)
  • 8

c)
  • (8, 7)

d)
  • Syntax Error

3.

What is the output of the following list function?

sampleList = [10, 20, 30, 40, 50]
sampleList.pop()
print(sampleList)

sampleList.pop(2)
print(sampleList)
a)
  • [20, 30, 40, 50]
    [10, 20, 40]

b)
  • [10, 20, 30, 40]
    [10, 20, 30, 50]

c)
  • [10, 20, 30, 40]
    [10, 20, 40]

4.

What is the output of the following print() function

print('%d %d %.2f' % (11, '22', 11.22))

a)
  • 11 22 11.22

b)
  • TypeError

c)
  • 11 ’22’ 11.22

5.

What is the output of the following range() function

for num in range(2,-5,-1):
    print(num, end=", ")
a)
  • 2, 1, 0

b)
  • 2, 1, 0, -1, -2, -3, -4, -5

c)
  • 2, 1, 0, -1, -2, -3, -4

6.

What is the output of the following

sampleDict = dict([
    ('first', 1),
    ('second', 2),
    ('third', 3)])
print(sampleDict)
a)
  • [ (‘first’, 100), (‘second’, 200), (‘third’, 300) ]

b)
  • Options: SyntaxError: invalid syntax

c)
  • {‘first’: 1, ‘second’: 2, ‘third’: 3}

7.

Which method is used to read file line by line

a)
  • read(1)

b)
  • readlines(1)

c)
  • readline()

d)
  • line()

8.

Choose the correct way to access value 20 from the following tuple

aTuple = ("Orange", [10, 20, 30], (5, 15, 25))
a)
  • aTuple[1:2][1]

b)
  • aTuple[1:2](1)

c)
  • aTuple[1:2][1]

d)
  • aTuple[1][1]

9.

What is the output of the following set operation

        set1 = {"Yellow", "Orange", "Black"}
     set2 = {"Orange", "Blue", "Pink"}
set3 = set2.difference(set1)
print(set3)
a)
  • {‘Yellow’, ”Black’, ‘Pink’, ‘Blue’}

b)
  • {‘Pink’, ‘Blue’}

c)
  • {‘Yellow’, ”Black’}

10.

What is the output of the below code?

class Square:

def __init__(self, side):

self.side = side

self.area = side*side 

s1 = Square(Square(Square(2).side).area)

print(s1.area)

a)

syntaxError

b)

TypeError

c)

4

d)

16

11.

How can you open a link in a new tab/browser window?

a)

<a href="url" target="new">

b)

<a href="url" target="_blank">  

c)

<a href="url" new>

12.

What is the correct HTML for making a drop-down list?

a)

<list>

b)

<input type="dropdown">

c)

<input type="list">

d)

<select>  

13.

The HTML <canvas> element is used to:

a)

manipulate data in MySQL

b)

draw graphics 

c)

create draggable elements

d)

display database records

14.

Who is making the Web standards?

a)

Google

b)

Microsoft

c)

Mozilla

d)

The World Wide Web Consortium  

15.

Choose the correct HTML element for the largest heading:

a)

<heading>

b)

<h6>

c)

<h1>

d)

<head>

16.

Who is the father of HTML?

a)

Rasmus Lerdorf

b)

Tim Berners-Lee

c)

Brendan Eich

d)

Sergey Brin

17.

Which tag is used to create a numbered list in HTML?

a)

<ol>

b)

<ul>

c)

<li>

d)

<ll>

18.

Which of the following is used to read an HTML page and render it?

a)

Web server

b)

Web network

c)

Web browser

d)

Web matrix

19.

In which part of the HTML metadata is contained?

a)

head tag

b)

title tag

c)

html tag

d)

body tag

20.

Which element is used to get highlighted text in HTML5?

a)

<u>

b)

<mark>

c)

<highlight>

d)

<b>

21.

In Operating Systems, which of the following is/are CPU scheduling algorithms?

a)

Priority

b)

Round Robin

c)

Shortest Job First

d)

All of the mentioned

22.

To access the services of the operating system, the interface is provided by the ___________

a)

Library

b)

System calls

c)

Assembly instructions

d)

API

23.

Which of the following is not an operating system?

a)
  1. Windows

b)
  1. Linux

c)
  1. Oracle

d)
  1. DOS

24.

Who among the following can block the running process?

a)
  1. Fork

b)
  1. Read

c)
  1. Down

d)
  1. All of these

25.

What is the maximum length of the filename in DOS?

a)

4

b)

5

c)

8

d)

12

26.

Java is short for "JavaScript".

a)

False  

b)

True

27.

Which operator is used to add together two values?

a)

The & sign

b)

The * sign

c)

The + sign  

28.

To declare an array in Java, define the variable type with:

a)

{ }

b)

( )

c)

[ ]  

29.

What is the correct way to create an object called myObj of MyClass?

a)

class MyClass = new myObj();

b)

MyClass myObj = new MyClass(); 

c)

class myObj = new MyClass();

d)

new myObj = MyClass();

30.

Which keyword is used to return a value inside a method?

a)

void

b)

break

c)

return

d)

get

31.

The C-preprocessors are specified with _________ symbol.

a)

#

b)

$

c)

” ”

d)

&

32.

In C language, FILE is of which data type?

a)

int

b)

char *

c)

struct

d)

None of the mentioned

33.

What will be the output of the following C code?


a)
  1. Compile time error

b)
  1. Hello World! 34

c)
  1. Hello World! 1000

d)
  1. Hello World! followed by a junk value

34.

In which of the following formats data is stored in the database management system?

a)

Image

b)

Text

c)

Table

d)

Graph

35.

Who created the first DBMS?

a)

Edgar Frank Codd

b)

Charles Bachman

c)

Charles Babbage

d)

Sharon B. Codd

36.

Which of the following sequences are unaccepted in C language?

a)
 #if
   #else
   #endif
b)
  #if
   #elif
   #endif
c)
#if
#if
   #endif
d)
#if
   #undef
   #endif
37.

What will be the data type returned for the following C function?


  1. #include <stdio.h>

  2. int func()

  3. {

  4. return (double)(char)5.0;

  5. }

a)

char

b)

int

c)

double

d)

multiple type-casting in return is illegal

38.

Which of the following cannot be a variable name in C?

a)

volatile

b)

true

c)

friend

d)

export

39.

All keywords in C are in ____________

a)

LowerCase letters

b)

UpperCase letters

c)

CamelCase letters

d)

None of the mentioned

40.

Which keyword is used to prevent any changes in the variable within a C program?

a)

immutable

b)

mutable

c)

const

d)

volatile

41.

Which of the following is a function of the DBMS?

a)

Storing data

b)

Providing multi-users access control

c)

Data Integrity

d)

All of the above

42.

What is information about data called?

a)

Hyper data

b)

Tera data

c)

Meta data

d)

Relations

43.

Which of the following is not a type of database?

a)

Hierarchical

b)

Network

c)

Distributed

d)

Decentralized

44.

What are the elements present in the array of the following C code?

int array[5] = {5};

a)
5, 5, 5, 5, 5
b)
5, 0, 0, 0, 0
c)
5, (garbage), (garbage), (garbage), (garbage)
d)
(garbage), (garbage), (garbage), (garbage), 5
45.

Why the following statement is erroneous?

a)

Dept_id should not be used in group by clause

b)

Group by clause is not valid in this query

c)

Avg(salary) should not be selected

d)

None

46.

_________________ operations do not preserve non-matched tuples.

a)

Left outer join

b)

Inner join

c)

Natural join

d)

Right outer join

47.

______________ is a set of one or more attributes taken collectively to uniquely identify a record.

a)

Primary Key

b)

Foreign key

c)

Super key

d)

Candidate key

48.

What does an RDBMS consist of?

a)

Collection of Records

b)

Collection of Keys

c)

Collection of Tables

d)

Collection of Fields

49.

What will be the final value of x in the following C code?

a)
  1. 3.75

b)
  1. Depends on compiler

c)
  1. 24

d)
  1. 3

50.

What is the function of the following command?

Delete from r where P;
a)

Clears entries from relation

b)

Deletes relation

c)

Deletes particular tuple from relation

d)

All of the mentioned