Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 31 pages
Exam (elaborations)

SC1003 QUIZ 1 STUDY GUIDE 2026 INTRODUCTION TO COMPUTATIONAL THINKING AND PROGRAMMING PRACTICE QUESTIONS

Document preview thumbnail
Preview 4 out of 31 pages

This SC1003 Quiz 1 Study Guide 2026 provides structured preparation for Nanyang Technological University's Introduction to Computational Thinking and Programming course. SC1003 covers computational thinking, programming languages, basic computer operations, program structures, abstraction, decomposition, pattern recognition, and algorithm design. Practice questions can help students reinforce foundational concepts and improve problem-solving skills. The resource is suitable for independent review and quiz preparation alongside official course materials. This is an independent study resource and does not claim to reproduce confidential or actual quiz questions.

Content preview

SC1003 QUIZ 1 STUDY GUIDE 2026
INTRODUCTION TO COMPUTATIONAL
THINKING AND PROGRAMMING PRACTICE
QUESTIONS


The function definition has no errors. - CORRECT ANSWER-
The function definition has no errors


In the following statements about Python functions, which one is
FALSE?


A function should be defined for one task and should not be too
long.
A function can have at most one return statement.
Functions should be reusable.
A function can be called by other functions.
When designing functions, we should always provide comments. -
CORRECT ANSWER-A function can have at most one return
statement.


In the following statements about recursive functions, which one
is FALSE?

,Recursive functions support the divide-and-conquer problem
solving.
Recursive functions are usually concise and elegant.
A function that invokes itself is called a recursive function.
A recursive function is always efficient than its loop-based
version. - CORRECT ANSWER-A recursive function is always
efficient than its loop-based version.


Which of the following is not an element of iterative
accumulation?


The variable to store the accumulation result.
The print statement to print the result.
The target value in each iteration.
The loop to drive accumulation iteratively. - CORRECT
ANSWER-The print statement to print the result.


Initialize student_counter to zero
While student_counter is less than or equal to ten
Input the next score
Add the score into the total
EndWhile
Set the class average to the total divided by ten

,There are some errors in the above Pseudocode. Please indicate
where the errors are and how to correct them - CORRECT
ANSWER-Initialize total to zero (Must initialize variable before
use)
Initialize student_counter to one (if counter starts from zero, will
be 11 students instead of 10)
While student_counter is less than or equal to ten
Input the next score
Add the score into the total
Add one to student_counter (update looping control variable)
EndWhile
Set the class average to the total divided by ten


Initialize passes to zero
Initialize failures to zero
Initialize student_counter to one
While student_counter is less than or equal to ten
Input the next score
*
*
*
*
*
add one to student_counter

, EndWhile
*
* - CORRECT ANSWER-If the student passed
Add one to passes
else
Add one to failures
EndIf




print the number of passes
print the number of failures


Write the FizzBuzz algorithm using pseudocode.
FizzBuzz is a standard interview problem. The Problem state:
Write a code that prints each number from 1 to 20 on a new line.
Print "Fizz" if the number is the multiple of 3. Print "Buzz" if the
number is multiple of 5
For number which is multiple of both 3 and 5 print "FizzBuzz"
The sample run is as follows:
1
2
Fizz
4

Document information

Uploaded on
September 7, 2026
Number of pages
31
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$23.89

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
188
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions