wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CLASS 8 CODING

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the purpose of the <img> tag in HTML?

a)

To create a hyperlink

b)

To embed images

c)

To define a list

d)

To format text

2.

What does the acronym 'API' stand for in coding?

a)

Advanced Programming Interface

b)

Application Programming Interface

c)

Automated Program Integration

d)

Assembly Programming Interface

3.

What is the purpose of the 'else' statement in an 'if-else' construct?

a)

To initialize a variable

b)

To create a loop

c)

To execute code when the condition is false

d)

To print output

4.

What is the purpose of the range() function in Python?

a)

To generate a sequence of numbers

b)

To check if a variable is within a range

c)

To calculate the average of a list

d)

To define a range of characters in a string

5.

What does the // operator do in Python?

a)

Exponential

b)

Floordivision

c)

Modulus

d)

Addition

6.

Which datatype is used for storing a sequence of characters in Python?

a)

int

b)

float

c)

str

d)

list

7.

Which of the following is used to get user input in Python?

a)

get()

b)

input()

c)

read()

d)

user()

8.

What is the correct way to write a comment in Python?

a)

//This is a comment

b)

/*This is a comment*/

c)

#This is a comment

d)

--This is a comment

9.

What does CSS stand for?

a)

Computer Style Sheets

b)

Creative Style Sheets

c)

Cascading Style Sheets

d)

Colorful Style Sheets

10.

How can you include external CSS in an HTML document?

a)

Using the <STYLE> tag

b)

Using the <CSS> tag

c)

Using the <LINK> tag

d)

Using the <EXTERNAL> tag