Font size
S
M
L
XL
Worksheetstech stack
Total questions: 55
Worksheet time: 28mins
Name
Class
Date
1.
What is the output of print(type([]))?
a)
<class 'dict'>
b)
<class 'list'>
c)
<class 'tuple'>
d)
<class 'set'>
2.
Which keyword is used to define a function in Python?
a)
function
b)
define
c)
def
d)
fun
3.
Which data structure is immutable in Python?
a)
List
b)
Set
c)
Dictionary
d)
Tuple
4.
What is the output of len('Python')?
a)
5
b)
6
c)
7
d)
Error
5.
Which is a boolean value in Python?
a)
YES
b)
True
c)
1
d)
'true'
6.
Which hook is used to manage state in React?
a)
useEffect
b)
useContext
c)
useState
d)
useReducer
7.
What is JSX?
a)
JavaScript XML
b)
Java Standard XML
c)
JavaScript Extension
d)
Java Syntax
8.
How do you pass data to a child component in React?
a)
state
b)
setState
c)
props
d)
context
9.
Which method is used for side-effects in React?
a)
useState
b)
useEffect
c)
componentDidMount
d)
setEffect
10.
What is the return type of a React component?
a)
String
b)
HTML
c)
JSX
d)
Function
11.
What does getServerSideProps do in Next.js?
a)
Generates static content
b)
Fetches data on every request
c)
Handles routing
d)
Defines styles
12.
What directory contains pages in Next.js?
a)
src
b)
routes
c)
pages
d)
components
13.
How do you start a Next.js dev server?
a)
npm run dev
b)
npm start
c)
next serve
d)
next init
14.
Which function is used for static generation in Next.js?
a)
getServerSideProps
b)
getStaticProps
c)
useEffect
d)
staticPage()
15.
Where are API routes in Next.js defined?
a)
/routes
b)
/api
c)
/pages/api
d)
/server/api
16.
What function creates an Express app?
a)
express.createApp()
b)
new Express()
c)
express()
d)
express.init()
17.
How do you define a GET route in Express?
a)
app.route()
b)
app.get()
c)
route.get()
d)
express.get()
18.
What is req.params used for in Express?
a)
Headers
b)
Query Params
c)
Route Params
d)
Response
19.
Middleware to parse JSON in Express?
a)
express.urlencoded()
b)
express.static()
c)
express.json()
d)
express.body()
20.
What does res.send() do?
a)
Receives data
b)
Sends response
c)
Sends email
d)
Creates a route
21.
What does HTML stand for?
a)
Hyper Tool Markup Language
b)
Hyperlinks and Text ML
c)
Hyper Text Markup Language
d)
Home Tool ML
22.
Tag for hyperlink in HTML?
a)
<hyper>
b)
<link>
c)
<a>
d)
<href>
23.
Tag to define a table row?
a)
<tr>
b)
<th>
c)
<td>
d)
<table>
24.
Tag for line break in HTML?
a)
<br>
b)
<break>
c)
<lb>
d)
<line>
25.
What tag creates a numbered list?
a)
<ul>
b)
<ol>
c)
<li>
d)
<dl>
26.
What does CSS stand for?
a)
Creative Style Sheets
b)
Cascading Style Sheets
c)
Colorful Style Sheets
d)
Computer Style Sheets
27.
How to select ID 'header' in CSS?
a)
.header
b)
#header
c)
header
d)
*header
28.
Property to change text color in CSS?
a)
font-color
b)
text-color
c)
color
d)
text-style
29.
Default value of position in CSS?
a)
relative
b)
static
c)
absolute
d)
fixed
30.
Which CSS unit is relative to parent font size?
a)
px
b)
%
c)
em
d)
rem
31.
What is React Native used for?
a)
Web development
b)
Desktop software
c)
Native mobile apps
d)
Game engines
32.
Which command initializes a new React Native app using Expo CLI?
a)
npx react-native init MyApp
b)
expo start
c)
npx create-react-app
d)
npx expo init MyApp
33.
What core component is used to display text in React Native?
a)
<Label>
b)
<Text>
c)
<Div>
d)
<Span>
34.
Which core component is used for layout in React Native?
a)
<Box>
b)
<Grid>
c)
<View>
d)
<Layout>
35.
Which of these is used to navigate between screens in React Native?
a)
Redux
b)
React Router
c)
React Navigation
d)
NavigatorJS
36.
Which keyword is used to create a class in Python?
a)
define
b)
function
c)
class
d)
object
37.
What does PEP stand for in Python?
a)
Python Easy Proposal
b)
Python Execution Process
c)
Python Enhancement Proposal
d)
Python Extension Program
38.
Which operator is used for exponentiation?
a)
^
b)
**
c)
^^
d)
%
39.
What is the output of bool(0)?
a)
True
b)
false
c)
None
d)
0
40.
What will 5 // 2 return?
a)
2.5
b)
2
c)
3
d)
2
41.
Which of the following is used to create a set?
a)
[]
b)
{}
c)
()
d)
set[]
42.
Which Python data type is an unordered collection of key-value pairs?
a)
List
b)
Set
c)
Tuple
d)
Dictionary
43.
What is the output of type("10")?
a)
<class 'int'>
b)
<class 'str'>
c)
<class 'float'>
d)
<class 'bool'>
44.
Which built-in function returns the length of an object?
a)
count()
b)
len()
c)
size()
d)
length()
45.
What keyword is used for a conditional statement in Python?
a)
if
b)
when
c)
for
d)
loop
46.
What does the pass statement do in Python?
a)
Ends the loop
b)
Skips iteration
c)
Placeholder for future code
d)
Raises error
47.
Which of the following is not a valid Python loop?
a)
for
b)
foreach
c)
while
d)
nested
48.
What does the range(5) function return?
a)
0 to 5
b)
1 to 5
c)
[0, 1, 2, 3, 4]
d)
[1, 2, 3, 4, 5]
49.
What is the keyword to import a module?
a)
require
b)
include
c)
import
d)
use
50.
What is the purpose of the useEffect hook in React?
a)
To manage state
b)
To handle side effects
c)
To create components
d)
To render UI
51.
How do you create a class in Python?
a)
new ClassName:
b)
class ClassName:
c)
create ClassName:
d)
def ClassName:
52.
What is the correct way to include a CSS file in an HTML document?
a)
<import href='styles.css'>
b)
<css href='styles.css'>
c)
<style src='styles.css'>
d)
<link rel='stylesheet' href='styles.css'>
53.
What will the following Node.js code output?
a)
1 2 3
b)
1 3 2
c)
2 1 3
d)
3 2 1
54.
Which method is used to create a server in Node.js?
(a)
55.
How do you install Express.js in a Node project?
(a)
Reset
