Professional Documents
Culture Documents
4. A docstring is another term for a Python variable that holds a string constant.
a. True
b. False
ANSWER: False
POINTS: 1
DIFFICULTY: Easy
REFERENCES: Basic Program Elements
QUESTION TYPE: True / False
HAS VARIABLES: False
DATE CREATED: 7/17/2018 3:25 PM
DATE MODIFIED: 7/17/2018 3:25 PM
9. If you print the string "Hello, it is a very \nice day", there will be two lines of output.
a. True
b. False
ANSWER: True
POINTS: 1
DIFFICULTY: Easy
REFERENCES: Basic Program Elements
QUESTION TYPE: True / False
HAS VARIABLES: False
DATE CREATED: 7/17/2018 3:25 PM
DATE MODIFIED: 7/17/2018 3:25 PM
10. Use the comparison operator != to check if one value is not equal to another value.
a. True
b. False
ANSWER: True
POINTS: 1
DIFFICULTY: Easy
Copyright Cengage Learning. Powered by Cognero. Page 3
Name: Class: Date:
11. In Python, a variable containing the value 5 will evaluate as true if used with the and logical operator.
a. True
b. False
ANSWER: True
POINTS: 1
DIFFICULTY: Moderate
REFERENCES: Basic Program Elements
QUESTION TYPE: True / False
HAS VARIABLES: False
DATE CREATED: 7/17/2018 3:25 PM
DATE MODIFIED: 7/17/2018 3:25 PM
13. The print function outputs a newline by default before its arguments are printed.
a. True
b. False
ANSWER: False
POINTS: 1
DIFFICULTY: Moderate
REFERENCES: Basic Program Elements
QUESTION TYPE: True / False
HAS VARIABLES: False
DATE CREATED: 7/17/2018 3:25 PM
DATE MODIFIED: 7/17/2018 3:25 PM
15. It is good practice to import all names from a module using the * operator.
a. True
b. False
ANSWER: False
POINTS: 1
DIFFICULTY: Easy
REFERENCES: Basic Program Elements
QUESTION TYPE: True / False
HAS VARIABLES: False
DATE CREATED: 7/17/2018 3:25 PM
DATE MODIFIED: 7/17/2018 3:25 PM
16. Indenting code that should be executed when an if statement evaluates as true makes your program easier to
read, but the indentation is not necessary.
a. True
b. False
ANSWER: False
POINTS: 1
DIFFICULTY: Easy
REFERENCES: Control Statements
QUESTION TYPE: True / False
HAS VARIABLES: False
DATE CREATED: 7/17/2018 3:25 PM
DATE MODIFIED: 7/17/2018 3:25 PM
17. The while statement uses the syntax while <Boolean expression>: and is the preferred control statement to
iterate over a definite range of sequences.
a. True
b. False
Copyright Cengage Learning. Powered by Cognero. Page 5
Another random document with
no related content on Scribd:
The Project Gutenberg eBook of Notes taken
during travels in Africa
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.
Language: English
TAKEN DURING
T R A V E L S I N A F R I C A.
t
Drawn by J. G. Wilkinson Esqre. from a Sketch taken Drawn on Stone & Printed by P. Gauci, 9, North Cres .
by the late John Davidson. re
Bedford Sq .
VIEW OF WADNOON.
From the roof of Sheik Beyrook’s House
NOTES
TAKEN DURING
T R A V E L S I N A F R I C A,
BY THE LATE
LONDON:
P R I N T E D B Y J . L . C O X A N D S O N S , 7 5 , G R E AT Q U E E N S T R E E T,
LINCOLN’S-INN FIELDS.
1839.
A D V E R T I S E M E N T.
Page
A P P E N D I X.
Extracts from the Correspondence of Mr. Davidson, during his Residence
in Morocco; with an Account of his further progress in the Desert 181
Account of Mr. Davidson’s Death, extracted from the Journal of the Royal
Geographical Society 202
History of Abou, extracted from the Journal of the Royal Geographical
Society 208
Mr. Hay’s Letter, referred to in the Notes, and Reply thereto 215
[Illustrations]
VIEW OF WADNOON.
Style of Buildings of Wadnoon.
THE RIVER DRAHA.
N O T E S
TAKEN DURING
T R A V E L S I N A F R I C A.