01/06/2021 Practice Test for the format of Final Test: Attempt reviewhttps://lms.latrobe.edu.au/mod/quiz/review.php?attempt=11476892&cmid=4872377 1/20My LMS Subjects / 2021-CSE4IP&CSE5CES(BU-1) / Assessment / Practice Test for the format of Final Test Started onSaturday, 29 May 2021, 10:29 AMStateFinishedCompleted onSaturday, 29 May 2021, 12:29 PMTime taken2 hours Question 1Not answeredMarked out of 1.00Question 2Not answeredMarked out of 1.00how di¨cult is the exam? (all answers are correct).a. Di¨cultb. Easyc. Very Di¨cultd. Very Easye. MediumWhich of the following operators is right-associative.a. =b. *c. andd. +01/06/2021 Practice Test for the format of Final Test: Attempt reviewhttps://lms.latrobe.edu.au/mod/quiz/review.php?attempt=11476892&cmid=4872377 2/20Question 3Not answeredMarked out of 1.00Question 4Not answeredMarked out of 1.00Question 5Not answeredMarked out of 1.00The function range(5) return a sequence ______________.a. 0, 1, 2, 3, 4, 5b. 0, 1, 2, 3, 4c. 1, 2, 3, 4d. 1, 2, 3, 4, 5What will be displayed by the following code?x, y = 1, 2x, y = y, xprint(y, x)a. 2 1b. 2 2c. 1 1d. 1 2What is x after the following statements?x = 1x *= x + 1a. 4b. 1c. 3d. 201/06/2021 Practice Test for the format of Final Test: Attempt reviewhttps://lms.latrobe.edu.au/mod/quiz/review.php?attempt=11476892&cmid=4872377 3/20Question 6Not answeredMarked out of 1.00Question 7Not answeredMarked out of 1.00Analyze the following code:even = Falseif even:print(“It is even!”)a. The code is wrong. replace if even: with if even = True:b. The code is wrong. replace if even: with if even == True:c. The code displays It is even!d. The code displays nothing.How many times will the following code print “Welcome to Python”?count = 0while count < 10:print(“Welcome to Python”)a. 10b. 9c. in¦nite number of timesd. 1101/06/2021 Practice Test for the format of Final Test: Attempt reviewhttps://lms.latrobe.edu.au/mod/quiz/review.php?attempt=11476892&cmid=4872377 4/20Question 8Not answeredMarked out of 1.00Question 9Not answeredMarked out of 1.00Question 10Not answeredMarked out of 1.00Will the following program terminate?balance = 10while True:if balance < 9:continuebalance = balance – 9a. Nob. YesWhich of the following is a valid identi¦er?a. Kilo1b. Whilec. Miled. (red)Which of the following is a valid identi¦er?a. 8+9b. 9Xc. miled. $34301/06/2021 Practice Test for the format of Final Test: Attempt reviewhttps://lms.latrobe.edu.au/mod/quiz/review.php?attempt=11476892&cmid=4872377 5/20Question 11Not answeredMarked out of 1.00Question 12Not answeredMarked out of 1.00Write what would be printed by the print statement in the following fragment of Python code.a. Fineb. OkWill the following program terminate?balance = 10while True:if balance < 9: breakbalance = balance – 9a. Yesb. No01/06/2021 Practice Test for the format of Final Test: Attempt reviewhttps://lms.latrobe.edu.au/mod/quiz/review.php?attempt=11476892&cmid=4872377 6/20Question 13Not answeredMarked out of 1.00Question 14Not answeredMarked out of 1.00Question 15Not answeredMarked out of 1.00What will be displayed when the following code is executed?number = 6while number > 0:number -= 3print(number)a. 6 3 0b. 6 3c. 3 0 -3d. 3 0Which of the following functions return 4.0a. int(3.4)b. int(3.9)c. round(3.5)d. eval(3.4)What is 2 ** 3 evaluates to __________.a. 8.0b. 9c. 9.0d. 801/06/2021 Practice Test for the format of Final Test: Attempt reviewhttps://lms.latrobe.edu.au/mod/quiz/review.php?attempt=11476892&cmid=4872377 7/20Question 16Not answeredMarked out of 1.00Question 17Not answeredMarked out of 1.00Question 18Not answeredMarked out of 1.00What will be displayed by the following code? def f1(x=1, y=2):x = x + yy += 1print(x, y)f1()a. 3 1b. 1 1c. 1 3d. 3 3What is the result of 45 / 4?a. 11.25b. 12c. 10d. 11Computer can execute the code in ____________.a. high-level languageb. assembly languagec. machine languaged. python language01/06/2021 Practice Test for the format of Final Test: Attempt reviewhttps://lms.latrobe.edu.au/mod/quiz/review.php?attempt=11476892&cmid=4872377 8/20Question 19Not answeredMarked out of 1.00Question 20Not answeredMarked out of 1.00Question 21Not answeredMarked out of 1.00An identi¦er can be a keyword?Select one:TrueFalseWhich of the following expression results in a value 1?a. 37 % 6b. 15 % 4c. 2 % 1d. 25 % 5Given the following functiondef nPrint(message, n):while n > 0:print(message)n -= 1What will be displayed by the call nPrint(‘a’, 4)?a. invalid callb. aaac. aaaad. in¦nite loop01/06/2021 Practice Test for the format of Final Test: Attempt reviewhttps://lms.latrobe.edu.au/mod/quiz/review.php?attempt=11476892&cmid=4872377 9/20Question 22Not answeredMarked out of 1.00Question 23Not answeredMarked out of 1.00Question 24Not answeredMarked out of 1.00The following code displays ___________.temperature = 50if temperature >= 100:print(“too hot”)elif temperature
