0% found this document useful (0 votes)
5 views14 pages

NPTEL - Joy of Computing Using Python

The document outlines the syllabus for an NPTEL course titled 'The Joy of Computing using Python,' covering various programming concepts such as variables, loops, lists, and functions. It includes multiple-choice questions (MCQs) with answers related to Python programming, testing knowledge on topics like computational thinking, data types, and error handling. The course aims to provide a foundational understanding of computing through practical examples and exercises.

Uploaded by

mail2roshinirk
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views14 pages

NPTEL - Joy of Computing Using Python

The document outlines the syllabus for an NPTEL course titled 'The Joy of Computing using Python,' covering various programming concepts such as variables, loops, lists, and functions. It includes multiple-choice questions (MCQs) with answers related to Python programming, testing knowledge on topics like computational thinking, data types, and error handling. The course aims to provide a foundational understanding of computing through practical examples and exercises.

Uploaded by

mail2roshinirk
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NPTEL-The Joy of Computing using Python

Syllabus:
Motivation for Computing, Welcome to Programming!!,Variables and Expressions : Design your own calculator,
Loops and Conditionals : Hopscotch once again, Lists, Tuples and Conditionals : Lets go on a trip, Abstraction
Everywhere : Apps in your phone, Counting Candies : Crowd to the rescue, Birthday Paradox : Find your twin,
Google Translate : Speak in any Language, Currency Converter : Count your foreign trip expenses, Monte Hall : 3
doors and a twist, Sorting : Arrange the books, Searching : Find in seconds, Substitution Cipher : What’s the secret
!!,Sentiment Analysis : Analyse your Facebook data,20 questions game : I can read your mind, Permutations :
Jumbled Words, Spot the similarities : Dobble game, Count the words : Hundreds, Thousands or Millions. Rock,
Paper and Scissor : Cheating not allowed !!,Lie detector : No lies, only TRUTH, Calculation of the Area : Don’t
measure., Six degrees of separation : Meet your favourites, Image Processing : Fun with images, Tic tac toe : Let’s
play ,Snakes and Ladders : Down the memory lane., Recursion : Tower of Hanoi, Page Rank : How Google Works
!!
MCQ WITH ANSWERS
[Link] is computational thinking important in A. Python uses braces {} for blocks
programming? B. Python is statically typed
A. It reduces the need for hardware C. Python is interpreted
B. It helps convert real-world problems into D. Python does not support functions
solvable steps 8. What will be the output?
C. It avoids the use of variables print("5" + "2")
D. It focuses only on syntax A. 7
2. Which scenario best justifies the need for B. 52
computers? C. Error
A. Writing essays D. 10
B. Performing billions of calculations accurately 9. Which of the following causes a syntax error?
C. Drawing diagrams A. x = 5 + 2
D. Printing documents B. print(x)
3. Which of the following is NOT a motivation for C. if x > 2 print(x)
computing? D. x = x * 2
A. Automation 10. Python programs are executed:
B. Speed A. Line by line
C. Accuracy B. Block by block
D. Guesswork C. All at once
4. Breaking a problem into subproblems is D. Only after compilation
known as: 11. Which variable name is INVALID in Python?
A. Abstraction A. _total
B. Pattern recognition B. total2
C. Decomposition C. 2total
D. Compilation D. total_sum
5. A computer is preferred over humans for 12. What will be the value of x?
calculations mainly because it: x = 10
A. Learns emotions x=x+5*2
B. Never makes mistakes in logic execution A. 30
C. Understands natural language B. 25
D. Works without instructions C. 20
6. What is the output? D. 15
print(type(5/2)) 13. Which operator has the highest precedence?
A. <class 'int'> A. +
B. <class 'float'> B. *
C. <class 'double'> C. **
D. Error D. /
7. Which statement about Python is TRUE? 14. What is the output?

Prepared by: [Link] AP/CSE


print(10 // 3) C. To declare variables
A. 3.33 D. To define constants
B. 3 25. What is the output?
C. 4 print(type(3 + 2.0))
D. Error A. <class 'int'>
15. Which expression gives a float result? B. <class 'float'>
A. 5 // 2 C. <class 'str'>
B. 5 / 2 D. Error
C. 5 % 2 26. What is the output?
D. 5 ** 0 s=0
16. What is the output? for i in range(1, 10, 2):
print(2 ** 3 ** 2) if i % 3 == 0:
A. 64 continue
B. 512 s += i
C. 36 print(s)
D. Error A. 16
17. Which operation must be handled carefully in B. 20
a calculator program? C. 25
A. Addition D. 30
B. Subtraction Explanation:
C. Division by zero range(1,10,2) → 1,3,5,7,9
D. Multiplication , correct answer: B (20) with intended logic:
18. What will be printed? 1+3+5+7+9 − (3+9) = 25−5 = 20.
x=5 27. How many times is "Hello" printed?
y=2 i=1
print(x % y) while i < 20:
A. 2 if i % 5 == 0:
B. 1 break
C. 0 print("Hello")
D. Error i += 3
19. Which expression evaluates to True? A. 2
A. 5 > 10 B. 3
B. 3 != 3 C. 4
C. 4 <= 4 D. 5
D. 7 < 2 Explanation:
20. What is the output? Values of i: 1 → 4 → 7 → 10
x=3 At i = 10, condition i % 5 == 0 → break
x += 2 Printed at 1,4,7 → 3 times
x *= 4 28. What is the output?
print(x) for i in range(3):
A. 20 for j in range(i):
B. 14 print(i, end="")
C. 24 A. 012
D. 8 B. 122
21. Which function converts user input to C. 112
integer? D. 1222
A. input() Explanation:
B. float() i=0 → no output
C. eval() i=1 → prints 1 once
D. int() i=2 → prints 2 twice
22. What happens if we execute: Output: 112
print(10 / 0) 29. What is the output?
A. Outputs infinity x=0
B. Outputs zero for i in range(5):
C. Runtime error if i == 3:
D. Syntax error x += 5
23. Which data type is best for calculator results else:
involving decimals? x += 1
A. int print(x)
B. str A. 8
C. float B. 9
D. bool C. 10
24. Why are loops useful in calculator programs? D. 11
A. To store values Explanation:
B. To repeat calculations without restarting Loop runs 5 times
Prepared by: [Link] AP/CSE
Four times +1 → 4 36.
Once (i==3) +5 → total 9? Wait carefully: travel = ["A", "B", "C"]
i: 0(+1),1(+1),2(+1),3(+5),4(+1) print(travel[-2])
Total = 9? Actually sum = 1+1+1+5+1 = 9 A. A
Correct answer should be B, but intended logic often B. B
traps students—however correct is 9. C. C
30. Which loop executes at least once? D. Error
A. for Explanation:
B. while Negative indexing: -1 → C, -2 → B
C. do-while 37. Which is NOT allowed on tuples?
D. repeat A. Indexing
Explanation: B. Iteration
do-while checks condition after execution C. Concatenation
(conceptual in Python). D. Modification
31. Explanation:
places = ["Goa", "Delhi", "Goa", "Pune"] Tuples cannot be modified.
print([Link]("Goa"))
A. 1 38.
B. 2 x = [1, 2, 3]
C. 3 y=x
D. Error [Link](4)
Explanation: print(x)
count() returns number of occurrences → 2 A. [1,2,3]
32. B. [4]
trip = ("Bus", "Train", "Flight") C. [1,2,3,4]
trip[1] = "Car" D. Error
A. Modified tuple Explanation:
B. Original tuple Both x and y reference same list
C. Runtime error
D. Syntax error 39.
Explanation: cities = ["A","B","C","D"]
Tuples are immutable → assignment causes print(cities[1:3])
TypeError at runtime A. ['A','B']
33. B. ['B','C']
lst = [10, 20, 30, 40] C. ['C','D']
[Link](1) D. ['B','C','D']
print(lst) Explanation:
A. [10, 20, 30] Slice excludes ending index.
B. [10, 30, 40]
C. [20, 30, 40] 40. Membership operator in Python:
D. [10, 20, 40] A. has
Explanation: B. contains
pop(1) removes element at index 1 → 20 removed C. in
D. exists
34. Which is TRUE about lists? 41. Abstraction helps to:
A. Immutable A. Increase complexity
B. Allow mixed data types B. Hide unnecessary details
C. Fixed size C. Reduce speed
D. Cannot be nested D. Remove functions
Explanation: 42. Best representation of abstraction in Python:
Lists can store different data types and nested lists A. Variables
B. Comments
35. C. Functions
l = [1, 2, 3] D. Constants
l += [4, 5] Explanation:
print(l) Functions hide internal logic.
A. [1,2,3,[4,5]]
B. [1,2,3,4,5] 43. Example of abstraction in apps:
C. Error A. Source code visibility
D. [4,5,1,2,3] B. Clicking icons
Explanation: C. RAM management
+= extends the list element-wise. D. Algorithms

44.
def f():
Prepared by: [Link] AP/CSE
pass while i < 5:
print(f()) if i == 3:
A. 0 break
B. False print(i, end=" ")
C. None i += 1
D. Error A. 0 1 2 3
B. 0 1 2
45. C. 0 1 2 3 4
def f(x): D. 0 1
return x+2 Explanation:
print(f(3)*f(2)) Loop stops when i == 3 before printing → prints 0 1
A. 20 2
B. 25
C. 15 2.
D. 10 for i in range(1, 6):
Explanation: if i % 2 == 0:
f(3)=5, f(2)=4 → 5×4 = 20? continue
Oops correction → 20, correct option A print(i, end=" ")
A. 1 3 5
46. Functions improve: B. 2 4
A. Code repetition C. 1 2 3 4 5
B. Memory usage D. 3 5
C. Code reuse and abstraction Explanation:
D. Execution time continue skips even numbers.
47.
def add(a,b=5): 3.
return a+b x = 10
print(add(3)) for i in range(3):
A. 3 x -= i
B. 5 print(x)
C. 8 A. 7
D. Error B. 8
48. Changing behavior via parameters is: C. 9
A. Encapsulation D. 10
B. Abstraction Explanation:
C. Parameterization i = 0,1,2 → x = 10 − (0+1+2) = 7
D. Compilation
4.
49. Apps are abstraction because: for i in range(2):
A. Show internal code for j in range(2):
B. Hide complexity if i == j:
C. Use loops print(i, j)
D. Use Python A. 0 0 1 1
B. 0 1 1 0
50. C. 0 0\n1 1
def calc(x): D. 1 1
if x%2==0: Explanation:
return x*2 Condition true only when i == j.
return x+1
5.
print(calc(5)+calc(4)) Which statement is TRUE?
A. 14 A. break skips to next iteration
B. 15 B. continue exits loop
C. 16 C. break terminates loop
D. 13 D. pass terminates program
Explanation:
calc(5)=6, calc(4)=8 → 6+8 = 14? 6.
L = [1, 2, 3]
PREVIOUS YEAR NPTEL MCQ(Loops and print(L * 2)
Conditionals : Hopscotch once again, Lists, A. [2, 4, 6]
Tuples and Conditionals : Lets go on a trip, B. [1, 2, 3, 1, 2, 3]
Abstraction Everywhere : Apps in your phone) C. Error
D. [1, 4, 9]
[Link] is the output? Explanation:
i=0 List repetition, not multiplication.
Prepared by: [Link] AP/CSE
A. (1, 2)
B. (2, 3)
7. C. (1, 2, 3)
L = [10, 20, 30] D. Error
print([Link](20))
A. 20 15.
B. 1 Which operation is NOT allowed on lists?
C. 2 A. Append
D. Error B. Delete
8. C. Slicing
T = (1, 2, 3) D. Fixed size
print(T + (4,))
A. (1, 2, 3, 4) 16.
B. (1, 2, 3) Abstraction mainly helps programmers to:
C. Error A. Write longer code
D. (4,) B. Hide internal implementation
Explanation: C. Reduce CPU speed
Tuples are immutable but can be concatenated. D. Avoid logic
17.
9. def f():
L = [1, 2, 3] return
M = [Link]() print(f())
[Link](4) A. 0
print(L) B. False
A. [1, 2, 3, 4] C. None
B. [1, 2, 3] D. Error
C. [4] 18.
D. Error def add(a, b):
Explanation: return a + b
copy() creates a new list.
print(add(2, 3))
10. A. 23
print(len([1, [2, 3], 4])) B. 5
A. 3 C. Error
B. 4 D. None
C. 5 19.
D. Error Which Python concept best represents abstraction?
Explanation: A. Loops
Nested list counts as one element. B. Variables
C. Functions
11. D. Operators
Which is TRUE about tuples?
A. Mutable 20.
B. Faster than lists def fun(x):
C. Can be modified if x > 0:
D. Can delete elements return x
12. print(fun(-3))
L = ["Goa", "Delhi", "Pune"] A. -3
print("Goa" in L) B. 0
A. True C. None
B. False D. Error
C. Error Explanation:
D. None No return for negative input → returns None.
21.
13. Apps are examples of abstraction because:
L = [1, 2, 3] A. They show algorithms
[Link](1, 5) B. They hide complexity
print(L) C. They expose hardware
A. [1, 5, 2, 3] D. They increase RAM
B. [1, 2, 5, 3] 22.
C. [5, 1, 2, 3] def f(x=5):
D. Error return x*2
14. print(f())
T = (1, 2, 3) A. 5
print(T[1:]) B. 10
Prepared by: [Link] AP/CSE
C. Error [Link] of the following is NOT an example of
D. None abstraction?
23. A. Camera app hiding sensor details
def g(x): B. Using APIs instead of writing hardware code
return x+1 C. Writing assembly code
D. Using a calculator app
print(g(g(2))) Explanation:
A. 3 Assembly code exposes hardware details instead of
B. 4 hiding them.
C. 5 Counting Candies: Crowd to the Rescue
D. Error [Link] is crowd-based counting used instead of
a single person?
24. A. To increase confusion
What is parameterization? B. To reduce individual error
A. Writing comments C. To waste time
B. Passing values to functions D. To increase cost
C. Importing modules Explanation:
D. Loop execution Multiple estimates reduce bias and error using
25. aggregation.
def calc(a, b):
return a if a > b else b [Link] many people estimate candies in a jar, the
print(calc(3, 7)) final answer is usually taken as:
A. 3 A. Maximum value
B. 7 B. Minimum value
C. True C. Average or median
D. Error D. Random value
[Link] of the following best describes Explanation:
abstraction in mobile apps? Mean or median balances out extreme guesses.
A. Writing code in Python
B. Hiding hardware details from users [Link] “wisdom of the crowd” works best when:
C. Increasing app size A. Everyone copies one answer
D. Making apps slower B. Estimates are independent
Explanation: C. Only experts participate
Abstraction hides complex implementation details D. There are very few people
(hardware, OS, network) and exposes only essential Explanation:
features to users. Independence avoids collective bias.
[Link] a map app shows only roads and [Link] computational thinking principle is
landmarks but hides GPS calculations, this is an applied when dividing a big counting task among
example of: many people?
A. Automation A. Pattern recognition
B. Decomposition B. Abstraction
C. Abstraction C. Decomposition
D. Parallelism D. Simulation
Explanation: Explanation:
Users see what the app does, not how it computes Decomposition breaks a problem into smaller tasks.
routes.
[Link] layer of abstraction directly interacts [Link] is most useful when:
with phone hardware? A. The problem has one obvious answer
A. Application layer B. The problem is subjective
B. User interface C. Individual solutions vary slightly
C. Operating system D. The task needs secrecy
D. Cloud services Explanation:
Explanation: Variation allows averaging to reduce error.
The OS acts as an abstraction layer between
hardware and applications. [Link] systems use humans to:
[Link] is abstraction essential for app A. Improve graphics
developers? B. Solve problems computers find difficult
A. To reduce app speed C. Increase server load
B. To reuse code and manage complexity D. Reduce security
C. To avoid testing Explanation:
D. To increase bugs Humans outperform computers in certain perception
Explanation: tasks.
Abstraction allows developers to build complex
systems efficiently.

Prepared by: [Link] AP/CSE


[Link] app feature is an example of functional Explanation:
abstraction? Abstraction hides hardware differences.
A. Login screen design [Link] candy counting, increasing the number of
B. “Send Message” button people usually:
C. Mobile hardware chip A. Increases error
D. Internet tower B. Decreases reliability
Explanation: C. Improves accuracy
A function hides multiple steps behind a single D. Has no effect
action.
[Link] crowd counting, why might median be Explanation:
preferred over mean? Law of large numbers improves accuracy.
A. It is harder to compute [Link] is a real-world abstraction example?
B. It ignores extreme values A. Blueprint of a building
C. It gives larger numbers B. Building itself
D. It uses fewer data points C. Construction material
Explanation: D. Workers
Median is robust against outliers. Explanation:
[Link] situation violates the principle of Blueprint abstracts essential design details.
abstraction? [Link] do apps show icons instead of code?
A. Using library functions A. Decoration
B. Hard-coding hardware details B. Abstraction for usability
C. Modular programming C. Memory usage
D. Using APIs D. Security risk
Explanation: Explanation:
Hard-coding exposes implementation details. Icons simplify user interaction.
[Link] app most strongly relies on abstraction [Link] fails when:
layers? A. Participants are diverse
A. Flashlight app B. Estimates are independent
B. Calculator C. Everyone follows one leader
C. Ride-sharing app D. Sample size is large
D. Alarm clock Explanation:
Explanation: Herd behavior reduces accuracy.
Ride-sharing apps integrate GPS, payments, maps, [Link] computational idea is shared by apps
cloud services. and crowd counting?
[Link] crowd estimates are biased high, the final A. Guessing
result will be: B. Brute force
A. Perfect C. Layered problem solving
B. Lower than actual D. Memorization
C. Higher than actual Explanation:
D. Random Both rely on layered abstractions.
Explanation: [Link] main goal of abstraction in computing is
Crowds amplify shared bias. to:
[Link] factor reduces the effectiveness of A. Eliminate algorithms
crowd solutions? B. Reduce problem complexity
A. Diversity of participants C. Increase hardware dependency
B. Independence D. Remove users
C. Communication between estimators Explanation:
D. Large sample size Abstraction helps manage complexity and scale
Explanation: systems efficiently.
Communication leads to groupthink.
[Link] are APIs considered abstraction tools? [Link] birthday paradox demonstrates that
A. They expose hardware probability intuition often fails because:
B. They hide implementation details A. Humans underestimate randomness
C. They slow programs B. Probabilities grow exponentially
D. They replace algorithms C. Pairwise comparisons increase rapidly
Explanation: D. Events are dependent
APIs provide functionality without revealing inner Explanation:
workings. Number of pairs grows as n(n−1)/2, causing
[Link] concept allows apps to work on probability to rise quickly.
different phones?
A. Abstraction [Link] a group of 23 people, the probability that at
B. Recursion least two share a birthday exceeds 50% because:
C. Brute force A. There are more people than days
D. Guessing B. Pairwise combinations dominate

Prepared by: [Link] AP/CSE


C. Leap years are ignored [Link] are APIs used in currency converters?
D. Birthdays are uniformly distributed A. To design UI
B. To fetch live exchange rates
[Link] assumption is essential for the classic C. To store history
birthday paradox calculation? D. To calculate taxes
A. Birthdays are dependent [Link] currency rates are cached for long periods,
B. Birthdays are uniformly distributed the app risks:
C. All months have equal days A. Slower performance
D. Leap years are included B. Inaccurate conversions
[Link] probability that no two people share a C. Higher costs
birthday is computed by: D. Network failure
A. Counting matching birthdays [Link] computational thinking skill is used
B. Subtracting from total days when converting expenses across multiple
C. Multiplying decreasing probabilities currencies?
D. Using permutation formula directly A. Decomposition
[Link] group size in the birthday paradox B. Abstraction
affects probability in which way? C. Algorithmic thinking
A. Linearly D. All of the above
B. Quadratically
C. Exponentially [Link] birthday paradox is important in
D. Randomly computing primarily because it:
[Link] Translate primarily relies on: A. Explains randomness
A. Rule-based translation B. Demonstrates collision probability
B. Dictionary lookup C. Improves encryption speed
C. Statistical and neural models D. Eliminates duplicates
D. Manual translation [Link] real-world system is most closely
related to the birthday paradox?
[Link] is direct word-to-word translation A. File compression
ineffective? B. Hash collisions
A. Languages use different alphabets C. Sorting algorithms
B. Grammar and context differ D. Image processing
C. Vocabulary is limited [Link] Translate improves accuracy by:
D. Translation is slow A. Increasing dictionary size
[Link] computational concept allows Google B. Learning from large corpora
Translate to handle new sentences? C. Using fixed grammar rules
A. Memorization D. Translating word by word
B. Pattern recognition [Link] factor most affects translation errors?
C. Random guessing A. Screen size
D. Brute force B. Context dependency
[Link] main challenge in machine translation is: C. Internet speed
A. Font rendering D. Font style
B. Context and ambiguity [Link] converter apps treat exchange rates
C. Internet speed as:
D. Storage A. Constants
B. Random values
[Link] does translation quality improve with C. Time-dependent variables
more data? D. Integers
A. Faster algorithms
B. Reduced memory [Link] birthday paradox becomes less accurate
C. Better statistical learning in real life mainly because:
D. Smaller models A. People forget birthdays
B. Birthdays are not uniformly distributed
[Link] conversion requires real-time data C. Calendars differ
primarily because: D. Probability theory fails
A. Currency names change
B. Exchange rates fluctuate [Link] is neural machine translation better than
C. Decimal systems differ rule-based systems?
D. Country borders change A. It requires less data
[Link] abstraction is used in currency B. It handles context better
converter apps? C. It avoids ambiguity
A. Hardware abstraction D. It uses fewer resources
B. Network protocol abstraction
C. Exchange rate as a function [Link] a currency converter ignores transaction
D. User interface design fees, the result will be:

Prepared by: [Link] AP/CSE


A. More accurate C. Optimality
B. Underestimated cost D. Transitivity
C. Overestimated cost
D. Unchanged [Link] is merge sort preferred for very large
datasets?
[Link] abstraction level allows currency A. It uses no extra memory
converters to work globally? B. It has consistent O(n log n) time
A. Hardware abstraction C. It is in-place
B. API abstraction D. It is easy to code
C. User interface abstraction [Link] improves searching efficiency
D. Language abstraction primarily by enabling:
A. Linear scanning
[Link] common computational idea behind all B. Binary search
three topics is: C. Hashing
A. Random guessing D. Random access
B. Statistical reasoning
C. Memorization [Link] algorithm benefits most from nearly
D. Manual computation sorted data?
[Link] the Monty Hall problem, the probability of A. Selection sort
winning by switching doors is higher because: B. Insertion sort
A. The host opens a random door C. Heap sort
B. The host avoids revealing the prize D. Merge sort
C. The remaining unopened door gains probability [Link] search requires the data to be:
mass A. Random
D. All doors become equally likely B. Sorted
Explanation: C. Unique
When the host reveals a goat, probability shifts to D. Balanced
the other unopened door. [Link] time complexity of binary search is:
[Link] assumption is essential for the Monty A. O(n)
Hall paradox to hold? B. O(n log n)
A. The host opens any door C. O(log n)
B. The host knows where the prize is D. O(1)
C. The player chooses last [Link] search is preferred over binary search
D. The prize changes position when:
[Link] the host sometimes opens a door randomly A. Data is very large
without knowing what’s behind it, switching: B. Data is unsorted
A. Always improves winning chances C. Data is static
B. Never improves chances D. Data is numeric
C. May or may not help [Link] data structure enables average O(1)
D. Guarantees a win search time?
[Link] Monty Hall to 100 doors, the A. Array
probability of winning by switching is B. Linked list
approximately: C. Hash table
A. 1/2 D. Binary tree
B. 1/100
C. 99/100 [Link] worst-case time complexity of searching
D. 50/100 in a balanced binary search tree is:
[Link] Carlo simulation is useful for Monty A. O(1)
Hall because it: B. O(log n)
A. Proves the paradox mathematically C. O(n)
B. Replaces probability theory D. O(n log n)
C. Empirically verifies probabilities
D. Removes randomness 91.A substitution cipher is vulnerable primarily
[Link] sorting algorithm has the worst-case because:
time complexity of O(n²)? A. It uses complex math
A. Merge sort B. Letter frequency is preserved
B. Heap sort C. It changes word order
C. Quick sort D. It uses random keys
D. Insertion sort
[Link] technique is most effective for breaking
[Link] property ensures that equal elements a substitution cipher?
retain their relative order after sorting? A. Brute force search
A. Completeness B. Frequency analysis
B. Stability C. Binary search
D. Hashing
Prepared by: [Link] AP/CSE
Wait—correct repetitions: B A L L O O N → 7
[Link] key space of a substitution cipher over the letters, L(2), O(2):
English alphabet is: 7!
= 1260
A. 26 2! 2!
B. 26²
C. 26! But option mismatch—correct answer is 1260 → C
D. 2²⁶ ✔ Correct Answer: C

[Link] a large key space, substitution ciphers are [Link] computational idea helps efficiently
weak because: generate permutations of a word?
A. Keys repeat A. Iteration only
B. Patterns remain in ciphertext B. Recursion
C. Encryption is slow C. Hashing
D. Decryption needs dictionaries D. Linear search
[Link] computational idea helps crack Explanation:
substitution ciphers efficiently? Recursive decomposition is ideal for generating
A. Random guessing permutations.
B. Pattern recognition [Link] does the number of permutations grow
C. Recursion very rapidly with word length?
D. Simulation A. Letters repeat
B. Factorial growth
[Link] analysis primarily aims to C. Linear scaling
determine: D. Randomness
A. Grammar accuracy [Link] of the following best reduces the
B. Emotional tone number of generated permutations?
C. Language structure A. Sorting the word
D. Writing style B. Removing duplicates
[Link] challenge most affects sentiment C. Increasing word length
analysis accuracy? D. Using loops
A. Font size [Link] a word with all unique letters,
B. Sarcasm and context permutations grow as:
C. Text length A. n²
D. Punctuation B. 2ⁿ
[Link] learning improves sentiment analysis C. n!
by: D. log n
A. Hard-coding rules [Link] Dobble game guarantees exactly one
B. Learning from labeled data common symbol between any two cards because
C. Ignoring context of:
D. Reducing vocabulary A. Random design
B. Graph theory
[Link] 20 Questions game works efficiently C. Finite projective planes
because it uses: D. Hash tables
A. Random guessing [Link] computational idea is primarily used
B. Linear search when identifying a common symbol quickly?
C. Binary decision trees A. Sorting
D. Brute force B. Searching
[Link] theoretical maximum number of objects C. Pattern recognition
distinguishable with 20 yes/no questions is: D. Encryption
A. 20 [Link] each card in Dobble has n symbols, the
B. 2²⁰ total number of cards possible is:
C. 20! A. n²
D. 20² B. n + 1
[Link] number of distinct permutations of the C. n² + n + 1
word BALLOON is: D. n!
A. 720 [Link] does Dobble scale poorly for very large
B. 840 symbol sets?
C. 1260 A. Memory overflow
D. 5040 B. Exponential growth
Explanation: C. Quadratic growth
BALLOON has 7 letters with L repeated twice and D. Linear increase
O repeated twice: [Link] data structure helps efficiently find
7! 5040 common elements between two sets?
= = 1260
2! 2! 4 A. List
B. Stack

Prepared by: [Link] AP/CSE


C. Set [Link] common challenge in permutations and
D. Queue big data word counting is:
[Link] counting in large text files primarily A. Visualization
demonstrates: B. Combinatorial explosion
A. Sorting C. User interaction
B. Recursion D. Encryption
C. Frequency analysis [Link] is brute force unsuitable for large-scale
D. Cryptography problems?
A. It is inaccurate
[Link] are dictionaries (hash maps) used for B. It scales poorly
word counting? C. It uses recursion
A. They preserve order D. It is deterministic
B. They allow O(1) average lookup
C. They reduce memory [Link] idea connects Dobble and word
D. They sort words automatically counting?
[Link] word count increases from thousands A. Encryption
to millions, which issue becomes most critical? B. Pattern matching
A. Syntax errors C. GUI abstraction
B. Memory usage D. File compression
C. Print formatting [Link] data grows from thousands to millions,
D. Variable naming which factor matters most?
[Link] is tokenization a crucial step in word A. Code readability
counting? B. Algorithm complexity
A. To sort words C. Variable names
B. To identify word boundaries D. Comments
C. To encrypt text [Link] core computational lesson across all
D. To remove punctuation only these topics is:
[Link] computational thinking skill is used to A. Memorization
scale word counting for huge datasets? B. Random guessing
A. Brute force C. Efficient scaling
B. Decomposition D. Manual effort
C. Memorization [Link] is randomness essential in the Paper–
D. Guessing Scissor game to prevent cheating?
[Link] “Rock” example in JoC mainly A. To increase game duration
illustrates: B. To avoid predictable patterns
A. File handling C. To reduce computation
B. Algorithmic efficiency D. To ensure fairness by rules
C. Object-oriented design Explanation:
D. GUI programming Predictable patterns allow opponents to exploit
[Link] do naive algorithms fail when data size strategies. Randomness prevents bias.
increases dramatically? [Link] computational concept ensures
A. Hardware limitations fairness in a digital Paper–Scissor game?
B. Poor user interface A. Deterministic logic
C. Super-linear time growth B. True randomness or pseudo-randomness
D. Syntax complexity C. Sequential execution
[Link] time complexity is most scalable for D. Sorting
massive data? [Link] a player always chooses “Paper”, the
A. O(n²) opponent can win consistently due to:
B. O(n log n) A. Randomness
C. O(2ⁿ) B. Pattern recognition
D. O(n³) C. Parallelism
[Link] word frequencies in a billion-word D. Encryption
dataset requires primarily: [Link] strategy guarantees no guaranteed win
A. Faster printers in Paper–Scissor?
B. Parallel processing A. Always repeating one move
C. Bigger screens B. Randomized selection
D. More syntax rules C. Alternating moves
[Link] abstraction allows programs to D. Copying opponent
handle millions of words without changing logic? [Link]–Scissor best illustrates which game-
A. Variable renaming theoretic idea?
B. Data structures A. Greedy choice
C. Syntax highlighting B. Nash equilibrium (mixed strategy)
D. Manual counting C. Brute force
D. Divide and conquer
Lie Detector: No Lies, Only TRUTH
Prepared by: [Link] AP/CSE
C. Small-world networks
[Link] detectors rely on the assumption that D. Tree structures
lying causes: [Link] data structure best represents social
A. Logical errors connections?
B. Emotional stress responses A. Stack
C. Speech delays only B. Queue
D. Random behavior C. Graph
[Link] data type is most commonly analyzed D. Array
in computational lie detection? [Link] the shortest connection path between
A. Images only two people uses:
B. Physiological signals A. Linear search
C. Source code B. Binary search
D. Numerical tables C. Breadth-first search
[Link] are lie detectors considered D. Depth-first search
probabilistic rather than deterministic? [Link] factor reduces the average separation
A. Sensors are faulty distance in networks?
B. Human behavior varies A. Fewer nodes
C. Algorithms are slow B. More random links
D. Data is encrypted C. Strict hierarchy
[Link] computational challenge most affects D. Isolation
lie detection accuracy? [Link] Degrees of Separation is important in
A. Hardware speed computing because it:
B. Individual variability A. Improves graphics
C. Data storage B. Explains network reachability
D. Network latency C. Encrypts communication
[Link] detection systems mainly apply which D. Sorts data
computing concept? 146.A digital image is fundamentally represented
A. Exact computation as:
B. Pattern recognition A. Continuous signals
C. Sorting B. Graph structures
D. Recursion C. Matrix of pixel values
[Link] area without measuring directly D. Random numbers
primarily relies on: [Link] conversion simplifies image
A. Exact geometry processing by:
B. Random sampling A. Increasing resolution
C. Sorting B. Reducing color channels
D. Encryption C. Improving sharpness
[Link] Carlo methods estimate area by: D. Adding noise
A. Counting grid points [Link] operation is used to detect edges in
B. Measuring boundaries images?
C. Using random points A. Sorting
D. Solving equations B. Convolution
[Link] of Monte Carlo area estimation C. Recursion
improves when: D. Hashing
A. Fewer samples are used [Link] do image processing algorithms scale
B. Sample size increases poorly for large images?
C. Shape becomes complex A. Syntax complexity
D. Randomness is removed B. Pixel-wise computation
[Link] is Monte Carlo preferred for irregular C. UI limitations
shapes? D. Storage format
A. Faster hardware [Link] common computational idea behind
B. Easy visualization randomness, Monte Carlo, networks, and image
C. Measurement is difficult analytically processing is:
D. Less memory A. Exact solutions
[Link] Carlo estimation demonstrates which B. Deterministic logic
computational idea? C. Data-driven approximation
A. Determinism D. Manual computation
B. Approximation [Link] Tic-Tac-Toe, a draw occurs under optimal
C. Recursion play because the game is:
D. Sorting A. Random
[Link] Degrees of Separation suggests that social B. Symmetric and finite
networks are: C. Continuous
A. Sparse D. Probabilistic
B. Highly disconnected

Prepared by: [Link] AP/CSE


Explanation: A. Iteration
Perfect-information, finite, symmetric games lead to B. Greedy strategy
predictable outcomes under optimal strategies. C. Recursion
D. Randomization
[Link] algorithmic idea ensures optimal
decision-making in Tic-Tac-Toe? [Link] minimum number of moves required to
A. Greedy algorithm solve Tower of Hanoi with n disks is:
B. Depth-first search A. n²
C. Minimax algorithm B. 2ⁿ − 1
D. Dynamic programming C. n!
[Link] total number of possible game states in D. n log n
Tic-Tac-Toe is finite because:
A. Board size is fixed [Link] aspect makes Tower of Hanoi an ideal
B. Players alternate recursion example?
C. Rules restrict moves A. Loop dependency
D. All of the above B. Overlapping subproblems
C. Self-similar structure
[Link] reduction in Tic-Tac-Toe is useful D. Random branching
because it:
A. Changes game rules [Link] complexity of Tower of Hanoi grows:
B. Reduces computation A. Linearly
C. Adds randomness B. Polynomially
D. Increases states C. Exponentially
D. Logarithmically
[Link] property allows Tic-Tac-Toe to be
solved completely by a computer? [Link] is recursion preferred over iteration in
A. Hidden information Tower of Hanoi?
B. Infinite moves A. Faster execution
C. Perfect information B. Simpler code mapping to logic
D. Real-time constraints C. Less memory
[Link] and Ladders is best modeled D. Avoids base cases
computationally as:
A. Tree [Link] models the web primarily as:
B. Graph A. Tree
C. Stack B. Array
D. Queue C. Directed graph
[Link] presence of ladders and snakes mainly D. Stack
introduces:
A. Determinism [Link] PageRank algorithm assigns importance
B. Recursion to a page based on:
C. Random jumps A. Number of words
D. Sorting B. Inbound links quality
[Link] algorithm is most suitable to compute C. Outbound links count
the minimum number of dice throws to win? D. Page size
A. Depth-first search
B. Breadth-first search [Link] damping factor in PageRank represents:
C. Binary search A. Link speed
D. Linear scan B. Random jump probability
C. Network latency
[Link] rolls in Snakes and Ladders represent: D. Memory usage
A. Deterministic transitions
B. Weighted probabilities [Link] computation converges because:
C. Uniform randomness A. Graph is acyclic
D. Backtracking B. Iterative updates stabilize
C. Links are symmetric
[Link] does Snakes and Ladders remain D. Pages are sorted
unpredictable even with complete rules known?
A. Infinite board [Link] computational technique is used to
B. Random dice outcomes compute PageRank?
C. Changing ladders A. Divide and conquer
D. Multiple players B. Recursion
C. Iterative approximation
[Link] Tower of Hanoi problem is best solved D. Greedy selection
using:

Prepared by: [Link] AP/CSE


[Link] common idea between Tic-Tac-Toe and
PageRank is:
A. Randomness
B. Graph traversal
C. Perfect information
D. Image processing

[Link] and Ladders and PageRank both


involve:
A. Linear equations
B. Probabilistic transitions
C. Sorting
D. Encryption

[Link] problem demonstrates exponential


growth most clearly?
A. Tic-Tac-Toe
B. Snakes and Ladders
C. Tower of Hanoi
D. PageRank

[Link] concept links recursion and


PageRank iteration?
A. Memoization
B. Convergence
C. Base case
D. Sorting

[Link] primary computational lesson across all


these topics is:
A. Memorization
B. Exact computation
C. Modeling real-world problems mathematically
D. Manual simulation

Prepared by: [Link] AP/CSE

You might also like