Computer Science > EXAM > COMP CS 1101 Review Quiz CS 1101 Final Exam | with correct answers. (All)
COMP CS 1101Review Quiz CS 1101 Final Exam | with correct answer Question text When a Python function is called, inside the function, the arguments are assigned to variables called parameters. Sel ... ect one: True False Feedback The correct answer is 'True'. Question 2 Correct Mark 1.00 out of 1.00 Flag question Question text What output will the following code produce? n = 10 while n != 1: print (n,end=' ') if n % 2 == 0: # n is even n = n // 2 else: # n is odd n = n * 3 + 1 Select one: a. 10 5 16 8 4 2 b. None an error will be displayed c. 8 4 2 d. 9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 Feedback The correct answer is: 10 5 16 8 4 2 Question 3 Correct Mark 1.00 out of 1.00 Flag question Question text What is the output of the following Python program? mylist = ["now", "four", "is", "score", "the", "and seven", "time", "years", "for"] print(" ".join(mylist[1::2])) Select one: a. now is the time b. now is the time for c. four score and seven years d. now four is score the and seven time years for Feedback Your answer is correct. The correct answer is: four score and seven years Question 4 Correct Mark 1.00 out of 1.00 Flag question Question text In Python, a list of characters is the same as a string. Select one: True False Feedback The correct answer is 'False'. Question 5 Correct Mark 1.00 out of 1.00 Flag question Question text Which one of the following Python expressions has the value 10? Select one: a. 8 ^ 2 b. 8 ** 2 c. 8 +- 2 d. 8 += 2 e. 8 -+ 2 Feedback Your answer is correct. The correct answer is: 8 ^ 2 Question 6 Incorrect Mark 0.00 out of 1.00 Flag question Question text What will the contents of mylist be after the following code has been executed? >>> mylist = [1, 4, 2 3] >>> mylist.append(5) Select one: a. [1, 4, 2, 3, 5] b. [5, 1, 4, 2, 3] c. [null] d. [1, 4, 2, 3] Feedback The correct answer is: [1, 4, 2, 3, 5] [Show More]
Last updated: 10 months ago
Preview 4 out of 21 pages
Loading document previews ...
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
CS 1101 Programming Fundamentals. all terms questions and answers, practice questions with correct answers and project. the right A grade materials to pass.
By Professor Lynne 4 years ago
$11
13
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jun 07, 2021
Number of pages
21
Written in
All
This document has been written for:
Uploaded
Jun 07, 2021
Downloads
0
Views
132
Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·