wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Full Stack Developer preparation basic 0.01

Total questions: 60

Worksheet time: 30mins

Name
Class
Date
1.

Which of the following is immutable in Python?

a)

List

b)

Dictionary

c)

Set

d)

Tuple

2.

What is the output of type([])?

a)

b)

c)

d)

3.

Which keyword is used to handle exceptions?

a)

catch

b)

handle

c)

try

d)

error

4.

What does len() do?

a)

Counts characters

b)

Returns memory size

c)

Returns number of elements

d)

Sorts elements

5.

Which operator is used for floor division?

a)

/

b)

%

c)

//

d)
6.

What is the output of bool("")?

a)

True

b)

False

c)

Error

d)

None

7.

Which data type stores key-value pairs?

a)

List

b)

Tuple

c)

Dictionary

d)

Set

8.

What does pass keyword do?

a)

Terminates loop

b)

Skips execution

c)

Does nothing

d)

Raises error

9.

How do you start a comment in Python?

a)

//

b)

#

d)

/**

10.

Which function converts string to integer?

a)

str()

b)

int()

c)

float()

d)

eval()

11.

What is the scope of a variable defined inside a function?

a)

Global

b)

Local

c)

Static

d)

Universal

12.

Which keyword creates a generator?

a)

return

b)

yield

c)

break

d)

pass

13.

Which collection does not allow duplicate values?

a)

List

b)

Tuple

c)

Dictionary

d)

Set

14.

What is the output of `3 2`?

a)

6

b)

9

c)

8

d)

12

15.

Which file extension is used for Python files?

a)

`.pt`

b)

`.pyt`

c)

`.py`

d)

`.python`

16.

Django follows which architecture?

a)

MVC

b)

MVP

c)

MVT

d)

MVVM

17.

Which Django component interacts with the database?

a)

Views

b)

Templates

c)

Models

d)

URLs

18.

Which command creates a Django project?

a)

`django start`

b)

`django-admin startproject`

c)

`python create project`

d)

`startdjango`

19.

Flask is best described as:

a)

Full-stack framework

b)

Heavy framework

c)

Micro-framework

d)

Frontend framework

20.

Which HTTP method is used to retrieve data?

a)

POST

b)

PUT

c)

GET

d)

DELETE

21.

What does ORM stand for?

a)

Object Relational Mapping

b)

Object Resource Manager

c)

Open Relational Model

d)

Online Record Mapping

22.

Django REST Framework is mainly used for:

a)

UI design

b)

Database optimization

c)

API development

d)

Testing

23.

Which file maps URLs to views in Django?

a)

views.py

b)

models.py

c)

urls.py

d)

admin.py

24.

Flask templates use which engine?

a)

Mako

b)

Jinja2

c)

Django Templates

d)

Blade

25.

Which status code means “Not Found”?

a)

200

b)

301

c)

404

d)

500

26.

What is CSRF protection used for?

a)

Performance

b)

Authentication

c)

Prevent fake requests

d)

Logging

27.

Which command runs Django server?

a)

`python startserver`

b)

`django run`

c)

`python manage.py runserver`

d)

`run django`

28.

JWT is mainly used for:

a)

UI rendering

b)

Authorization

c)

Logging

d)

Database

29.

Which Flask decorator defines routes?

a)

`@flask.route()`

b)

`@route()`

c)

`@app.route()`

d)

`@url()`

30.

REST stands for:

a)

Reliable Server Transfer

b)

Representational State Transfer

c)

Resource State Transfer

d)

Remote Server Technology

31.

HTML stands for:

a)

High Text Machine Language

b)

Hyper Text Markup Language

c)

Hyperlinks Text Mark Language

d)

Home Tool Markup Language

32.

Which CSS property controls layout alignment?

a)

margin

b)

padding

c)

flex

d)

position

33.

JavaScript is a:

a)

Compiled language

b)

Markup language

c)

Interpreted language

d)

Assembly language

34.

Which tag is used to include JavaScript?

a)

b)

c)