Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

NodeJS and Python Flask

Total questions: 61

Worksheet time: 31mins

Name
Class
Date
1.

NodeJS is build on which JavaScript engine?

a)

V8 Engine

b)

SpiderMonkey

c)

Chakra

d)

Nashorn

2.

What is the architecture of Node.js?

a)

Single-threaded, event-driven

b)

Multi-threaded blocking

c)

Distributed thread-based

d)

Parrallel synchronous

3.

What is the file package.json used for?

a)

Manage project dêpndencises and metadata

b)

Store user data

c)

Create database

d)

Complie JavaScript code

4.

What does npm stand for?

a)

Node Package Manager

b)

Node Project Module

c)

New Project Manager

d)

Network Pakage Module

5.

Which command initializes a file package.json?
package.json?

a)

npm init

b)

npm start

c)

node init

d)

npm create

6.

Which command runs the file in app.jsNode.js?
app.js?

a)

node app.js

b)

npm app.js

c)

run app.js

d)

execute app.js

7.

Which module is used to create an HTTP server in Node.js?

a)

http

b)

fs

c)

os

d)

path

8.

Which command installs
the Express framework?

a)

npm install express

b)

npm add express.js

c)

node install express

d)

install express

9.

What does a method res.send()do in Express ?
res.send()

a)

Send response to client

b)

Send request to another server

c)

Save data to database

d)

Stop server

10.

Which command checks the installed Node.js version?

a)

node -v

b)

node --check

c)

npm -version

d)

node --show

11.

What is the module used for in Node.js ?

a)

Manage file system

b)

Create HTTP server

c)

Process JSON data

d)

Manage network connection

12.

What is middleware in Express?

a)

A function that processes requests/responses before reaching the route handler

b)

A type of database

c)

A CSS tool

d)

An operating system module

13.

What is the common default port for a Node.js server?

a)

3000

b)

5000

c)

80

d)

22

14.

What require('module')does do in Node.js ?
require('module')?

a)

Import a module

b)

Export data to the outside

c)

Create a server

d)

Save to a file

15.

What is a callback function in Node.js?

a)

The function is passed into another function and called back when finished

b)

The function runs immediately

c)

The function runs synchronously

d)

The function is only used in the database

16.

What is the main advantage of Node.js?

a)

Asynchronous, non-blocking I/O

b)

3D graphics support

c)

OS management

d)

CSS-friendly

17.

What does the processobject in Node.js provide?

a)

Node.js process information and control

b)

Database management

c)

CSS processing

d)

REST API creation

18.

Which command installs a package globally?

a)

npm install -g package

b)

npm add package

c)

npm --global package

d)

npm install package

19.

What is the syntax to export a module in Node.js?

A. module.exports = myFunc;✅
B. export myFunc;
C. exports: myFunc;
D.require myFunc;

a)
module.export = myFunc;
b)
exports.myFunc();
c)
import myFunc from './myFunc';
d)

module.exports = myFunc;

20.

Node.js is mainly used for which type of applications?

a)

Web applications and APIs

b)

3D graphics applications

c)

Office computer applications

d)

Web browsers

21.

Which tool is commonly used to manage libraries in a Node.js front-end project?

a)

npm

b)

MySQL

c)

Flask

d)

Redis

22.

Which tool is commonly used to bundle front-end code?

a)

Webpack

b)

Docker

c)

MongoDB

d)

Express

23.

What is npm script usually "start": "webpack serve"used for?
"start": "webpack serve"?

a)

Launch the front-end development server

b)

Launch the database

c)

Deploy the Flask app

d)

Configure the operating system

24.

Which tool compiles ES6+ code to ES5 for older browsers?

a)

Babel

b)

React

c)

SQLALchemy

d)

Vue

25.

What is the purpose of package-lock.jsonin a Node.js front-end project ?

a)

Save the correct version of dependencies

b)

Save user data

c)

Run the front-end server

d)

Generate CSS file

26.

Which framework is commonly used to build UI in the Node.js ecosystem?

a)

React

b)

Flask

c)

Django

d)

Laravel

27.

What does usually npm run build do in a front-end project?

a)

Create the optimal version for deployment

b)

Build the database

c)

Run the Flask server

d)

Configure the firewall

28.

Which tool can be used instead of npm to install packages?

a)

Yarn

b)

MySQL

c)

Docker

d)

Redis

29.

What does SPA mean in front-end
development ?

a)

Single Page Application

b)

Server Page Architecture

c)

Standard Program API

d)

Scripted Page App

30.

What is the main advantage of SPA?

a)

Smooth experience, no full page reload

b)

Faster page loading than SSR

c)

No back-end required

d)

No API

31.

Which framework is an alternative to React in the Node.js ecosystem?

a)

Angular

b)

Flask

c)

Django

d)

Laravel

32.

Which tool is used to manage and install global CLI tools in Node.js front-end?

a)

npm (with -g flag)

b)

SQL

c)

Flask CLI

d)

Docker CLI

33.

What is JSX in React?

a)

JavaScript XML

b)

Java Syntax Extension

c)

JSON Extension

d)

Java Server eXtension

34.

What is the benefit of Webpack?

a)

Bundle multiple JS/CSS files into one

b)

Create database

c)

Process API

d)

Run Node.js server

35.

What does it npm auditdo?

a)

Check for security vulnerabilities in dependencies

b)

Create a build file

c)

Run unit tests

d)

Deploy to the server

36.

Which tool supports hot-reload in Node.js front-end?

a)

Webpack Dev Server

b)

MySQL

c)

Flask

d)

MongoDB

37.

What is the purpose of Virtual DOM in React?

a)

Optimize interface updates

b)

Manage database

c)

Run Node.js server

d)

Write CSS

38.

In React, state what is ?

a)

Variables that store data that changes over time

b)

CSS style

c)

Database

d)

Constant variables

39.

Which command installs React in a Node.js front-end project?

a)

npm install react react-dom

b)

npm add react

c)

install react

d)

npm get react

40.

Which tool supports running TypeScript in Node.js front-end?

a)

ts-node

b)

Babel

c)

SQLAlchemy

d)

Flask

41.

What type of framework is Flask in Python?

a)

Micro web framework

b)

Full-stack web framework

c)

Data science framework

d)

GUI framework

42.

Flask is written in which language?

a)

Python

b)

Java

c)

C++

d)

JavaScript

43.

Which command installs Flask?

a)

pip install flask

b)

npm install flask

c)

conda flask install

d)

python flask

44.

@app.route() What is the purpose of in Flask ?

a)

Define route/URL for function

b)

Call other API

c)

Connect to database

d)

Define Python class

45.

Which command runs a Flask app?

a)

flask run

b)

python run flask

c)

node flask

d)

npm start

46.

By default, Flask runs on which port?

a)

5000

b)

3000

c)

80

d)

22

47.

Which library is used for rendering HTML templates in Flask?

a)

Jinja2

b)

Bootstrap

c)

React

d)

Angular

48.

Which code creates a simple Flask app?

a)

from flask import Flask

app = Flask(__name__)

@app.route("/")

def home():

return "Hello Flask"

b)

import flask

flask.run()

c)

print("Flask App")

d)

node app.js

49.

Flask is often used with which database?

a)

SQLite

b)

Oracle

c)

Firebase

d)

MS Access

50.

Which command checks Flask version?

a)

pip show flask

b)
flask --version
c)
flask version
d)
flask -v
e)

pip show flask -v

51.

What type of routing does Flask support?

a)

Dynamic routing

b)

Only static routing

c)

No routing

d)

CSS routing

52.

What does Flask do render_template()?

a)

Render HTML template

b)

Render CSS

c)

Render JSON API

d)

Render database

53.

By default, is Flask synchronous or asynchronous?

a)

Synchronous

b)

Asynchronous

c)

Multi-threaded

d)

Parallel

54.

Which function does Flask use to return JSON data?

a)

jsonify()

b)

toJSON()

c)

parseJSON()

d)

renderJSON()

55.

Is Flask a full-stack framework?

a)

No

b)

Yes

56.

What is the framework of Flask

a)

micro web framework

b)

full-stack

57.

What is Flask often referred to as in the Python community?

a)

"Micro framework"

b)

"Enterprise framework"

c)

"Data framework"

d)

"Game framework"

58.

Which design pattern does Flask use?

a)

MVC (Model-View-Controller)

b)

MVVM

c)

MVP

d)

Layered

59.

Can Flask be extended with plugins?

a)

Yes

b)

No

60.

Which special variable in Flask identifies the module or package name?

a)

__name__

b)

__main__

c)

__init__

d)

__file__

61.

What is the biggest advantage of Flask?

a)

Lightweight, simple, easy to extend

b)

Built-in powerful ORM

c)

Default support for real-time

d)

UI template available