Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

UNIT I: Fundamentals of Computers

Total questions: 150

Worksheet time: 1hrs 15mins

Name
Class
Date
1.

Which statement best defines a computer in this unit?

a)

A mechanical tool that prints documents only

b)

An electronic device that manipulates data

c)

A network cable that connects two devices

d)

A portable gadget for entertainment purposes

2.

Which trio describes core data operations of a computer?

a)

Store, retrieve, process

b)

Scan, copy, fax

c)

Transmit, route, switch

d)

Design, debug, deploy

3.

Which classification refers to personal computers?

a)

Workstations

b)

Supercomputers

c)

Mainframes

d)

Microcomputers

4.

Which is NOT listed as a reason to use computers?

a)

Fragility

b)

Reliability

c)

Efficiency

d)

Accuracy

5.

Which group lists basic computer components?

a)

Browser, website, hyperlink

b)

Battery, charger, power strip

c)

Monitor, wallpaper, screensaver

d)

Input devices, CPU, output devices

6.

Which unit contains the Arithmetic and Logic Unit and control?

a)

Input interface board

b)

Central Processing Unit

c)

Main memory module

d)

Auxiliary storage bay

7.

What does computer science primarily study?

a)

Computers and computing theory and applications

b)

Only electrical circuits inside processors

c)

Historical timelines of supercomputers

d)

Only business uses of spreadsheets

8.

Which set lists examples of software from the unit?

a)

CPU, RAM, SSD

b)

Cable, router, switch

c)

Keyboard, mouse, monitor

d)

MS Word, Excel, Chrome

9.

Which description best fits hardware?

a)

Physical components you can touch

b)

Executable code stored in memory

c)

Cloud services for web hosting

d)

Abstract algorithms and data

10.

Which statement defines computation in this unit?

a)

Random trial processes without structure

b)

Only arithmetic performed by handheld calculators

c)

Any calculation following a well-defined model

d)

Graphic design tasks done on computers

11.

What is computational problem solving?

a)

Using algorithms and programs to solve problems

b)

Drawing flowcharts without implementing

c)

Guessing results and checking later

d)

Buying faster hardware to avoid delays

12.

Which two elements are essential to solve a problem computationally?

a)

A fast printer and a scanner

b)

A spreadsheet and a slideshow

c)

A suitable representation and an algorithm

d)

An operating system and antivirus

13.

Which example illustrates limits of computational problem solving discussed here?

a)

Travelling Salesman Problem

b)

Printing a document

c)

Sorting a small array

d)

Adding two integers

14.

Why can a brute-force approach to TSP be impractical?

a)

Distances between cities are always zero

b)

Number of possible routes grows factorially

c)

Computers cannot compare route lengths

d)

Maps cannot be represented digitally

15.

For ten cities in TSP, how many possible routes are there under brute force?

a)

10 possible routes

b)

2102^{10} possible routes

c)

10210^2 possible routes

d)

10! possible routes

16.

Which item belongs to hardware rather than software?

a)

Printer device

b)

Operating system

c)

Web browser app

d)

Spreadsheet file

17.

Which misconception about computers is corrected by this unit?

a)

Computers convert raw data into information

b)

Computers are only for entertainment uses

c)

Computers cannot store data reliably

d)

Computers have no role in communication

18.

Which scenario best requires DoK 3 reasoning with these concepts?

a)

Choosing an efficient algorithm for many cities

b)

Recalling the definition of microcomputer

c)

Listing three common output devices

d)

Identifying icons of office software

19.

Which statement best defines a computer algorithm?

a)

An endless loop that tries solutions

b)

Any informal idea for solving tasks

c)

Random instructions executed by hardware

d)

A finite sequence of unambiguous steps

20.

Why are computer algorithms central to computer science?

a)

They provide step-by-step computation

b)

They replace all computer hardware

c)

They guarantee instantaneous results

d)

They remove the need for software

21.

In binary representation, what values can a single digit take?

a)

Only 0 or 1

b)

Any number 0 through 9

c)

Only 1 or 2

d)

Any integer value

22.

What does the base (radix) of a number system indicate?

a)

Speed of arithmetic operations

b)

Count of unique digits used

c)

Power of ten in each column

d)

Largest place value available

23.

Which hardware component is called the brain of the computer?

a)

Main memory module

b)

Central processing unit

c)

Input device panel

d)

Magnetic storage unit

24.

What is the primary difference between main and secondary memory?

a)

Volatility versus persistence

b)

Size versus speed only

c)

User versus kernel control

d)

Analog versus digital signals

25.

What is the value of the binary place labeled 252^5 in base 2?

a)

64 in decimal value

b)

32 in decimal value

c)

16 in decimal value

d)

8 in decimal value

26.

Which statement about integrated circuits is accurate?

a)

They contain many transistors

b)

They operate without power

c)

They store data magnetically

d)

They are purely mechanical

27.

What does the term bit stand for?

a)

Basic integer type

b)

Binary digit unit

c)

Bitwise instruction

d)

Buffered input tool

28.

How many bits are in one byte?

a)

Four bits total

b)

Sixteen bits total

c)

Ten bits total

d)

Eight bits total

29.

Which unit immediately follows gigabyte in the metric list shown?

a)

Megabyte unit

b)

Terabyte unit

c)

Petabyte unit

d)

Kilobyte unit

30.

Which task is the operating system primarily responsible for?

a)

Providing permanent power

b)

Compiling source programs

c)

Managing hardware resources

d)

Designing algorithms automatically

31.

During the SDLC, which activity belongs to the Analysis phase?

a)

Clearly understand the problem

b)

Package final media files

c)

Represent data in code

d)

Execute programs on hardware

32.

Which action aligns with the Design phase of the SDLC?

a)

Determine required data structures

b)

Purchase peripheral devices

c)

Run acceptance benchmarks

d)

Refactor low-level drivers

33.

Which step characterizes Implementation in the SDLC?

a)

Collect user satisfaction surveys

b)

Estimate long-term maintenance

c)

Authorize procurement budgets

d)

Express algorithms in a language

34.

What is the primary goal of Testing in the SDLC?

a)

Rewrite the project charter

b)

Detect and correct errors found

c)

Increase CPU clock speeds

d)

Compress executable binaries

35.

A light switch analogy for binary digits illustrates which property?

a)

Three-valued logic gates

b)

Two possible states only

c)

Analog voltage ranges

d)

Infinite discrete levels

36.

You must store programs for long-term retention when power is off. Which storage should you select?

a)

Volatile primary main memory

b)

Temporary cache exclusively

c)

CPU internal registers only

d)

Non-volatile secondary memory

37.

Which term best describes Python in terms of program translation and execution model?

a)

Transcompiled to Java source directly

b)

Assembled into platform firmware images

c)

Interpreted with bytecode execution model

d)

Compiled ahead to native machine code

38.

Which pair correctly lists two emphasized characteristics of Python at the outset?

a)

Closed-source and licensed

b)

Statically typed and verbose

c)

Interactive and object-oriented

d)

Low-level and hardware-near

39.

What does it mean that Python is considered beginner’s language?

a)

It forbids advanced libraries entirely

b)

It replaces all code with drag-and-drop

c)

It uses minimal keywords and simple syntax

d)

It only runs example programs from books

40.

Which feature explains why programmers do not usually manage memory manually in Python?

a)

Explicit free calls after object deletion

b)

Compile-time region annotations for objects

c)

Automatic memory management with garbage collection

d)

Mandatory pointer arithmetic for arrays

41.

Which statement best captures Python’s portability claim?

a)

Scripts must be packaged into firmware images

b)

Binaries are tied to one processor family

c)

Source runs unchanged across many platforms

d)

Programs require separate rewrites per device

42.

What aligns with Python being a high-level language?

a)

Developers manage registers directly

b)

Focus on abstract data types and operations

c)

Write kernel drivers first for I/O

d)

Manual stack frame layout for functions

43.

Which idea distinguishes procedure-oriented from object-oriented styles as supported by Python?

a)

Procedures are graphical; objects only command-line

b)

Procedures mandate inheritance; objects forbid encapsulation

c)

Procedures require classes; objects avoid methods entirely

d)

Procedures reuse functions; objects combine data and behavior

44.

Which benefit is most closely tied to Python’s lack of type declarations in typical code?

a)

Guaranteed compile-time overflow checks

b)

Deterministic real-time execution deadlines

c)

Simpler, shorter, more flexible programs

d)

Faster pointer dereferencing in loops

45.

Which statement about dynamic loading of C modules in Python is accurate?

a)

Loading requires a full operating system reboot

b)

Modules must be statically linked at build time

c)

Extensions can be added without stopping programs

d)

Only Java bytecode extensions are supported

46.

Which description fits CPython among Python flavors?

a)

Reference implementation written in C language

b)

Python runtime implemented in Java for JVM

c)

Front-end that outputs only C++ templates

d)

Meta-tracing JIT entirely in RPython

47.

What is Jython primarily designed to do?

a)

Use CUDA cores for automatic array parallelism

b)

Run Python on the Java platform with JVM integration

c)

Compile Python directly to native Windows executables

d)

Translate Python into C header-only libraries

48.

Which outcome follows from Python generating bytecode when compiled or executed?

a)

Bytecode can run on a Python Virtual Machine

b)

Bytecode must be linked into kernel space

c)

Bytecode executes only on one CPU vendor

d)

Bytecode disables dynamic typing features

49.

You must choose a Python flavor to embed within a large Java application while keeping access to Java classes. Which choice best fits?

a)

MicroPython for desktop integration

b)

PyPy for ahead-of-time C compilation

c)

Jython for seamless JVM interoperability

d)

CPython for native POSIX threads

50.

A team needs faster runtime through just-in-time compilation while still running Python semantics. Which flavor is the most plausible option?

a)

IronPython with bytecode to firmware

b)

Jython using only static compilation

c)

CPython without any JIT support

d)

PyPy with tracing JIT optimizations

51.

Which statement best describes the role of the Python Virtual Machine (PVM)?

a)

It compiles source directly to native binaries

b)

It packages dependencies for distribution only

c)

It converts bytecode to machine code for execution

d)

It manages GUI rendering for Python windows

52.

Which Python flavor is tightly integrated with the .NET Framework?

a)

PyPy with tracing JIT compiler

b)

IronPython open-source implementation

c)

Stockless Python stackless engine

d)

.NETPy proprietary bridge layer

53.

Ruby Python primarily serves as what between ecosystems?

a)

A packaging tool for Ruby gems

b)

A transpiler from Ruby to C code

c)

A bridge between Ruby and Python interpreters

d)

A bytecode optimizer for Ruby VMs

54.

Anaconda Python is mainly used to simplify which tasks?

a)

Mobile app compilation for Android

b)

Scientific package management and deployment

c)

Kernel development and driver signing

d)

Low-level networking and sockets tuning

55.

In the typical Python execution pipeline, what is the correct order?

a)

Source code to IR to JIT to firmware

b)

Source code to assembler to CPU

c)

Source code to bytecode to PVM to machine code

d)

Source code to machine code to linker

56.

Static memory allocation in Python context is associated with which storage structure?

a)

Register file inside the CPU

b)

Global area for shared libraries

c)

Heap region for dynamic objects

d)

Stack structure storing static memory

57.

Dynamic memory allocation primarily uses which area and when?

a)

ROM while loading modules

b)

Registers during interpretation

c)

Heap at runtime when needed

d)

Stack at compile time only

58.

What triggers Python’s garbage collector to reclaim an object under reference counting?

a)

When module import finishes

b)

When CPU usage becomes high

c)

When object age exceeds threshold

d)

When reference count drops to zero

59.

Which action typically increases an object’s reference count?

a)

Assigning a new name to the object

b)

Reassigning the variable elsewhere

c)

Deleting the object explicitly

d)

Letting the reference go out of scope

60.

Which action decreases an object’s reference count?

a)

Creating a shallow copy list

b)

Adding it to a tuple container

c)

Incrementing an integer attribute

d)

Reassigning the variable to another object

61.

A program creates x = [0]*2 and later del x. Under reference counting, what happens to the list object?

a)

It becomes compiled to native code

b)

It moves from stack to registers

c)

Its reference count drops and may be freed

d)

Its references increase and persist

62.

Why is Stackless (Stockless) Python notable in the text?

a)

It uses C stack but clears between calls

b)

It eliminates the C stack between function calls

c)

It targets embedded microcontrollers only

d)

It replaces PVM with a JIT compiler

63.

Who is credited with conceptualizing the Python programming language in the late 1980s?

a)

James Gosling

b)

Rasmus Lerdorf

c)

Bjarne Stroustrup

d)

Guido Van Rossum

64.

Where was the first public release of Python (version 0.9.0) published in February 1991?

a)

MIT in Cambridge

b)

CWI in Amsterdam

c)

Bell Labs in Murray Hill

d)

Stanford in Palo Alto

65.

Python’s name was chosen because its creator was a fan of which British comedy group’s show?

a)

The Comic Strip Presents

b)

Monty Python’s Flying Circus

c)

Little Britain

d)

The Two Ronnies

66.

Which language at CWI influenced Python’s design as a general‑purpose language?

a)

ABC programming language

b)

AWK scripting language

c)

PASCAL systems language

d)

BASIC beginner’s language

67.

Arrange these version milestones in chronological order from earliest to latest: Python 1.0, Python 2.0, Python 3.0.

a)

3.0, 2.0, 1.0

b)

1.0, 3.0, 2.0

c)

1.0, 2.0, 3.0

d)

2.0, 1.0, 3.0

68.

Which company in the visual list is best known as a major search engine that uses Python in multiple services?

a)

Google, a search engine company

b)

Netflix, a streaming provider

c)

Dropbox, a storage platform

d)

Spotify, a music service

69.

Select the platform from the image that primarily offers music streaming and uses Python.

a)

Spotify, a music platform

b)

Dropbox, a file service

c)

YouTube, a video site

d)

Quora, a Q&A site

70.

Which pair both appear in the image as companies using Python and are video-related platforms?

a)

YouTube and Netflix

b)

Google and BitTorrent

c)

Quora and Dropbox

d)

Instagram and Spotify

71.

A startup building peer-to-peer file distribution tools wants examples of Python adopters with similar models. Which logo from the image best fits this need?

a)

Facebook for social networking

b)

BitTorrent for peer-to-peer

c)

Quora for knowledge sharing

d)

Instagram for photo sharing

72.

If a company plans to integrate cloud file synchronization features and seeks a Python-using role model from the image, which should they study first?

a)

Quora for Q&A

b)

Dropbox for file sync

c)

Spotify for playlists

d)

Instagram for stories

73.

Which area is a common real‑world application of Python?

a)

Astrology and horoscopes

b)

Mechanical gear shaping

c)

Analog circuit design

d)

Web and internet development

74.

What does IDE stand for in the context of Python development?

a)

Integrated Development Environment

b)

Interactive Design Emulator

c)

Internal Debug Executor

d)

Independent Deployment Engine

75.

Which component is typically included in an IDE to help find program errors?

a)

A firmware flasher

b)

A packet sniffer

c)

A hardware oscilloscope

d)

A program debugger

76.

Python is most commonly executed using which mechanism?

a)

A linker-loader

b)

A microkernel

c)

A bytecode burner

d)

An interpreter

77.

In IDLE, what is the interactive window that lets you execute statements immediately called?

a)

The command linker

b)

The runtime cache

c)

The static console

d)

The Python shell

78.

Which option best describes the Python Standard Library?

a)

A set of paid plug‑ins

b)

A repository of compiled binaries

c)

A third‑party app marketplace

d)

A collection of built‑in modules

79.

You need to prototype a small GUI tool and then debug it step by step. Which IDLE features directly support this workflow?

a)

Daemon and cron tools

b)

Editor and debugger tools

c)

Hypervisor and snapshot tools

d)

Assembler and linker tools

80.

A student wants functionality beyond Python’s core without installing packages. What should they explore first?

a)

Modules in the Standard Library

b)

Kernel device drivers

c)

Cloud orchestration stacks

d)

Custom machine code inserts

81.

Which category in Python literals includes integer, float, and complex values?

a)

Special literals category in Python

b)

Boolean literals category in Python

c)

Numeric literals category in Python

d)

String literals category in Python

82.

Which option lists only collection literal types as shown in the diagram?

a)

True, False, None, Dictionary

b)

List, Tuple, Set, Dictionary

c)

String, Boolean, Integer, List

d)

Integer, Float, Complex, Tuple

83.

What is the best example of a Boolean literal in Python?

a)

1 used as truthy value

b)

True without quotes

c)

None used in a condition

d)

'True' enclosed in quotes

84.

A value like 3+4j belongs to which literal subtype according to the categorization?

a)

Special literal subtype

b)

Complex literal subtype

c)

Integer literal subtype

d)

Float literal subtype

85.

Which statement correctly contrasts string literals with collection literals based on the diagrammed categories?

a)

Strings store multiple keyed pairs, collections do not

b)

Strings represent text values, collections group multiple items

c)

Strings are numeric values, collections are textual values

d)

Strings are Booleans, collections are numbers

86.

You need an unordered collection of unique items as a literal. Which collection type fits this requirement?

a)

Set literal with unique membership

b)

Tuple literal that is mutable sequence

c)

List literal with duplicates allowed

d)

Dictionary literal storing only values

87.

Consider initializing configuration flags. Which literal choice makes the intent most explicit?

a)

Use numeric 1 and 0 for flags

b)

Use string 'yes' and 'no' values

c)

Use Boolean True and False literals

d)

Use None for enabled and disabled

88.

Which is a valid Python string literal?

a)

AMJ College enclosed in brackets

b)

AMJ-College using hyphen only

c)

AMJ College without any quotes

d)

"AMJ College" enclosed in quotes

89.

Which statement best describes a single-line string in Python?

a)

Text without quotation marks

b)

Text stored as numeric code

c)

Text spanning many lines

d)

Text terminated within one line

90.

Which is a correct way to create a multi-line string?

a)

Using triple quotation marks

b)

Placing spaces between words

c)

Ending each line with semicolons

d)

Using single quotes repeatedly

91.

Which numeric literal has no fractional part?

a)

Scientific like 1e3

b)

Float like 123.45

c)

Integer like 100

d)

Complex like 67+89j

92.

Which option represents a float literal?

a)

12345 without decimal

b)

123.45 with decimal

c)

67+89j as complex

d)

True as boolean

93.

Which Python literal represents the absence of a value?

a)

None special literal

b)

Zero numeric value

c)

Empty string literal

d)

False boolean value

94.

What values can a Boolean literal take in Python?

a)

On or Off words

b)

Yes or No strings

c)

1 to 0 range

d)

True or False only

95.

Consider the code: a = 10; a = a + 2; print(a). What will be displayed?

a)

a printed as text

b)

Error due to types

c)

12 after reassignment

d)

10 without change

96.

Which name is a valid Python variable identifier?

a)

2price starting with digit

b)

price-2 using hyphen

c)

price2 starting with letter

d)

price 2 with space

97.

Which assignment correctly binds a string value to a variable?

a)

name == John

b)

name = "John"

c)

"name" = John

d)

name : John

98.

Which statement about constants is accurate in Python practice?

a)

A constant must be an integer only

b)

A constant’s value should not change

c)

A constant must be declared with const

d)

A constant cannot be assigned initially

99.

Which literal type includes a real and an imaginary part?

a)

Float numbers like 123.45

b)

Complex numbers like 67+89j

c)

Boolean values like True

d)

Integer numbers like 100

100.

Which is a valid Python identifier under naming rules?

a)

value%tax

b)

_totalSum

c)

first-name

d)

2nd_value

e)

class

101.

Which statement about Python identifiers is correct?

a)

They may start with underscore

b)

They may duplicate any keyword

c)

They may contain spaces inside

d)

They may use @ or # symbols

e)

They may start with a digit

102.

Identify the set containing only allowed identifier characters (after first position).

a)

digits, hyphen, spaces, percent

b)

lowercase, at-sign, caret, slash

c)

lowercase, uppercase, digits, underscore

d)

uppercase, spaces, hash, star

e)

underscore, colon, comma, semicolon

103.

Which option shows case sensitivity of identifiers?

a)

Python ignores letter casing always

b)

SUM and sum must match

c)

total and total are different

d)

myVar and MyVar are different

e)

Name and name are identical

104.

Choose the invalid identifier and the reason.

a)

for, reserved keyword

b)

value2, starts with letter

c)

rate%, ends with percent

d)

_index, uses underscore

e)

DataSet, mixed case allowed

105.

How many keywords exist in Python 3.7 as listed in the table?

a)

28 keywords total

b)

33 keywords total

c)

30 keywords total

d)

25 keywords total

e)

35 keywords total

106.

Select the true statement about Python keywords.

a)

They can be variable names

b)

They change at runtime

c)

They are case sensitive

d)

They are valid identifiers

e)

They require module import

107.

Which group contains only Python keywords?

a)

True, none, class

b)

if, else, while

c)

main, then, begin

d)

int, str, float

e)

print, input, pass

108.

What does the input function primarily do in Python?

a)

Displays text without reading

b)

Reads user data from keyboard

c)

Converts types automatically

d)

Validates numeric ranges

e)

Terminates program execution

109.

Given code: name = input('What is your name?: '), what is 'What is your name?: ' called?

a)

A multiline comment

b)

A prompt string

c)

A keyword literal

d)

A docstring for module

e)

A format specifier

110.

Which statement best describes the print function?

a)

It evaluates input expressions

b)

It handles file I/O by default

c)

It declares variables globally

d)

It displays information on screen

e)

It compiles Python source

111.

You must create a variable for number of attempts. Choose the best identifier.

a)

num attempts

b)

attempts_count

c)

3attempts

d)

attempts%count

e)

return

112.

Which print call correctly outputs the line with double quotes around Welcome to Python Programming?

a)

print('"Welcome to Python Programming"')

b)

print("\"Welcome to Python Programming\"")

c)

print("Welcome to Python Programming")

d)

print('Welcome to Python Programming')

113.

Given num1 = int(input()), num2 = int(input()), which statement correctly prints the product with a label?

a)

print('Multiplication is = ' + str(num1), str(num2))

b)

print('Multiplication is:' + num1 * num2)

c)

print('Multiplication is' + num1, num2)

d)

print('Multiplication is', num1 * num2)

114.

What will be printed by print('My', 'Name', 'Is', ' I BCA D ', sep='**')?

a)

My**Name**Is** I BCA D

b)

My Name Is I BCA D

c)

My**Name Is** I BCA D

d)

My*Name*Is* I BCA D

115.

Which formatting prints the float value 458.541315 rounded to two decimal places using percent-formatting?

a)

print('{:.02}'.format(458.541315))

b)

print('%.2f' % 458.541315)

c)

print(round(458.541315, '2'))

d)

print(f'%2f' % 458.541315)

116.

Which code correctly accepts three space-separated names in one input and prints them on separate lines?

a)

a,b,c = map(input().split()); print(a,b,c)

b)

a,b,c = input(); print(a); print(b); print(c)

c)

a,b,c = input().split(); print(a); print(b); print(c)

d)

names = input().split(); print(names)

117.

For BMI calculation with weight in kilograms and height in meters, which expression is correct?

a)

bmi = weight*height*height

b)

bmi = weight/(height*height)

c)

bmi = weight/height

d)

bmi = (height/weight)*height

118.

Which statement best defines an operator in Python?

a)

A symbol that performs an operation on operands

b)

A procedure that converts strings to integers

c)

A stored value assigned to a variable name

d)

A container that holds multiple values in order

119.

Which operator performs exponentiation in Python?

a)

%% double percent for power

b)

caretoperatorforpower^ caret operator for power

c)

** double asterisk for power

d)

pow as infix arithmetic

120.

What is the result of 9 // 2 in Python?

a)

4 with floor removal

b)

4.0 as float quotient

c)

5 after rounding up

d)

4 remainder two kept

121.

Which arithmetic operator returns the remainder of division?

a)

// floor division operator

b)

/ true division operator

c)

% modulus operator

d)

* multiplication operator

122.

Given a = 20 and b = 5, which expression evaluates to 4?

a)

b ** a gives power

b)

a / b gives quotient

c)

a % b gives remainder

d)

a // b gives quotient

123.

Which statement about comparison operators is correct?

a)

!= checks inequality

b)

>= means strictly greater than

c)

<= means strictly less than

d)

== assigns a value

124.

Evaluate the relational expression: 7 < 10 and 7 > 20

a)

False because both are false

b)

False because one is false

c)

True because both are true

d)

True because one is true

125.

Which operator assigns a value to a variable?

a)

== equality comparator

b)

= assignment operator

c)

:= walrus operator

d)

=> arrow assignment

126.

Choose the expression that evaluates to True:

a)

7 == 10 equality check

b)

7 >= 10 comparison test

c)

7 != 10 inequality check

d)

7 > 10 comparison test

127.

What is the effect of the not operator in Python?

a)

It compares two values

b)

It reverses a condition

c)

It performs bitwise negation

d)

It doubles boolean values

128.

If x = 3 and y = 8, which expression is True?

a)

not x < y and x < y

b)

x < y or x == y

c)

x > y and x == y

d)

x >= y and x < y

129.

Which option best describes arithmetic operators in Python?

a)

They compare two operands

b)

They assign values to variables

c)

They perform mathematical operations

d)

They test membership in containers

130.

Consider: a = 15, b = 4. What is a % b?

a)

3 because remainder three

b)

4 because divisor returned

c)

3.0 because float output

d)

-1 due to truncation

131.

Which expression demonstrates floor division producing a float?

a)

9 % 2 gives remainder

b)

9 / 2 gives float

c)

9.0 // 2.0 gives float

d)

9 // 2 gives integer

132.

Select the correct pairing of operator and meaning.

a)

< means less than or equal to

b)

>= means greater or equal to

c)

== means assignment operator

d)

!= means equal to operator

133.

For booleans p and q, which expression is True only when both are True?

a)

p or q logical disjunction

b)

p and q logical conjunction

c)

not p unary inversion

d)

p == q equality relation

134.

Which bitwise operator performs a binary OR between two integers?

a)

| operator between operands

b)

& operator between operands

c)

^ operator between operands

d)

~ operator on operand

135.

What is the result of 5 & 3 using bitwise AND on integers?

a)

-6 after complementing

b)

1 after binary comparison

c)

7 after combining bits

d)

6 after toggling bits

136.

For integers, what does the left shift operator << do to the left operand?

a)

Combines bits using exclusive OR

b)

Flips every bit of the value

c)

Moves bits left by given count

d)

Moves bits right by given count

137.

Evaluate 100 >> 2 for integer right shift with zero fill on positive numbers.

a)

25 after shifting two places

b)

400 after shifting two places

c)

50 after shifting two places

d)

200 after shifting two places

138.

Which expression checks sequence membership and returns True when an element exists in a list?

a)

3 is [1,2,3,4]

b)

3 == [1,2,3,4]

c)

3 not in [1,2,3,4]

d)

3 in [1,2,3,4]

139.

Choose the statement that correctly uses the not in operator with a tuple.

a)

'x' not in ('a','b')

b)

'x' in ('a','b')

c)

'x' is ('a','b')

d)

'x' == ('a','b')

140.

Which operator compares whether two variables refer to the same object in memory?

a)

in membership operator

b)

is identity operator

c)

== equality operator

d)

^ bitwise operator

141.

Given a = [1,2]; b = a; c = [1,2]. Which expression is True?

a)

a == b evaluates False

b)

a is b evaluates True

c)

a in c evaluates True

d)

a is c evaluates True

142.

Which statement best defines an expression in Python?

a)

A compiled unit that optimizes runtime speed

b)

A named block that groups reusable procedures

c)

A sequence of statements that changes program state

d)

A combination of symbols that evaluates to a value

143.

In the arithmetic expression z = a + b - c * d / e, which operation is applied first under standard precedence?

a)

Division of the result by e first

b)

Subtraction of c from the sum a+b

c)

Addition of a and b before others

d)

Multiplication of c and d before division

144.

What is a sub-expression in the context of arithmetic expressions?

a)

Any expression that is part of a larger expression

b)

Any expression evaluated after assignment

c)

Any expression that contains only literals

d)

Any expression that returns a Boolean

145.

Given x = (y + z) * n, why are parentheses used around y + z?

a)

To allocate memory for the variables

b)

To reduce floating-point rounding errors

c)

To override precedence and force addition first

d)

To cast the sum to integer type

146.

Consider Python's operator precedence and evaluate the numeric result: 3 + 4 * 2 - 8 / 4.

a)

3.0 because addition executes before all

b)

11.0 because operators evaluate left to right

c)

2.0 since subtraction has highest precedence

d)

9.0 after applying multiplication and division first

147.

Which operators have the highest precedence when evaluating a Python expression?

a)

Parentheses grouping with ()

b)

Exponentiation with **

c)

Unary plus and minus

d)

Multiplication and division

148.

What is the associativity of the exponentiation operator ** in Python?

a)

Right to left evaluation

b)

Left to right evaluation

c)

No defined associativity

d)

Alternating by nesting

149.

In the expression 2 ** 3 ** 2, how is it evaluated under Python’s rules?

a)

2 ** 3 * 2

b)

(2 ** 3) * 2

c)

(2 ** 3) ** 2

d)

2 ** (3 ** 2)

150.

Which group of operators shares left-to-right associativity according to the table?

a)

Parentheses grouping

b)

*, /, //, %

c)

Assignment operators

d)

Lambda expressions