*NURSING > EXAM > CS 1101 Final Exam. latest document 2021; correct answers on the exam questions. (All)
Question 1 Answer saved Marked out of 1.00 Flag question Question text After the Python code below has run, what happens if 'the_fle' does not already exist? try: fin = open('the_file', 'r') ... except: fin = open('the_file', 'w') fin.close() Select one: a. A run-time error is printed out b. An exception is printed out c. Nothing d. An empty fle is created e. Syntax error Question 2 Answer saved Marked out of 1.00 Flag question Question text The Python code below is an example of recursion: def fa(): fb() def fb():fa() fa() Select one: True False Question 3 Answer saved Marked out of 1.00 Flag question Question text Assume that d is a Python dictionary. What does the following Python code produce? d.items() Select one: a. a histogram b. an inverted dictionary c. a list of tuples d. a lookup e. a reverse lookup Question 4 Answer saved Marked out of 1.00 Flag question Question textGenerally speaking, flter list operations produce a different number of list elements compared to map operations. Select one: True False Question 5 Answer saved Marked out of 1.00 Flag question Question text What is the output of the Python method call below? "bib".fnd('b', 1, 2) Select one: a. 0 b. 2 c. -1 d. syntax error e. 3 Question 6 Answer saved Marked out of 1.00 Flag question Question text To examine a program’s source code and analyze its syntactic structure is to: [Show More]
Last updated: 2 years ago
Preview 1 out of 15 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
exam questions and correct answers
By Prof.Pierro 4 years ago
$13
12
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jun 11, 2021
Number of pages
15
Written in
This document has been written for:
Uploaded
Jun 11, 2021
Downloads
0
Views
276
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·