Highlights
Part A: Multiple Choice
Select the best answer.
1. In a Python program, which one is a valid function name:
a. 558_getScore
b. get&Sore
c. getScore
d. get@Score
2. A value that is passed to a function is called a(n):
a. identifier
b. argument
c. statement
d. variable
3. An algorithm:
a. is a Python program
b. is written by using the machine language
c. is a set of well-defined logical steps that must be taken to perform a task
d. does not maintain the order of a set of well-defined logical steps
4. A value-returning function is:
a. a single statement that perform a specific task
b. called when you want the function to stop
c. a function that will return a value back to the part of the program that called it
d. a function that receives a value when it is called
5. What is the output of the following code?
def main(): x = 5 x = calTest(x) print (x) def calTest(y): y = int (y) y = 3 ** (1 + 1 * 2) // y % (20 / 2) return y main()
a. 10.0
b. 5
c. 5.0
d. 10
6. In a Python program, values are stored in:
a. statements
b. expressions
c. variables
d. operators
7. To use the functions in an external module, a program should use a(n):
a. comment
b. open statement
c. import statement
d. operator
8. In object-oriented programming, an object is created using a:
a. Mutator method
b. Accessor methods
c. Initializer method
d. Create method
9. Which programming structure is the most appropriate to describe the statement “When it's cold close the window and the curtains, otherwise when it's windy close the window, and otherwise leave the window and curtains open”:
a. if...else
b. while
c. if...elif...else
d. for
10. If you need to re-use a section of code and use it in a number of different places, which is the most appropriate approach to use:
a. while loop
b. for loop
c. if statement
d. a function
11. What is the appropriate statement to call the doCalc() method of an object called thisObj, passing the variable x as a parameter and capturing the return value into a variable answer?
a. doCalc(thisObj, x, answer)
b. answer = doCalc(thisObj, x)
c. answer = thisObj.doCalc(x)
d. thisObj(answer) = doCalc(x)
12. Which method will return an empty string when it has attempted to read beyond the end of a file?
a. read
b. getline
c. input
d. readline
This IT/Computer Science Assignment has been solved by our IT/Computer Science Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.