<< Chapter < Page Chapter >> Page >
This module contains review questions and answers keyed to the module titled Itse1359-1110-Nested Tuples.

Table of contents

Preface

This module is one in a collection of modules on Python designed for teaching ITSE 1359 Introduction to Scripting Languages: Python at Austin Community College in Austin, TX.

This module contains review questions and answers keyed to the module titled Itse1359-1110-Nested Tuples .

Once you study that module, you should be able to answer the review questions in this module.

The questions and the answers in this module are connected by hyperlinks to make it easy for you to navigate from the question to the answer and back again.

(Note to blind and visually impaired students: with the exception of two bitmap images that are used solely as spacers to separate the questionsection from the answer section, all of the material in this module is presented in plain text format and should be accessible using an audio screen reader or abraille display.)

Questions

Question 1

True or False? The program code in Listing 1 produces the output shown in Figure 1 .

Listing 1 . Question 1 program code.
t1 = 1,2 print(t1)t2 = "a","b" print(t2)t3 = "A",t1,"B",t2 print(t3)
Figure 1 . Question 1 possible output.
(1, 2) ('a', 'b')('A', (1, 2), 'B', ('a', 'b'))

Go to answer 1

Question 2

True or False? The program code in Listing 2 produces the output shown in Figure 2 .

Listing 2 . Question 2 program code.
t1 = 1,2 print(t1)t2 = "a","b" print(t2)t3 = "A",t1,"B",t2 print(t3)print(len(t3))
Figure 2 . Question 2 possible output.
(1, 2) ('a', 'b')('A', (1, 2), 'B', ('a', 'b')) 6

Go to answer 2

Figure index

Listing index

What is the meaning of the following two images?

These images were inserted here simply to insert some space between the questions and the answers to keep them from being visible on the screen at thesame time.

Spacer image of a rabbit and a penguin.

This image was also inserted for the purpose of inserting space between the questions and the answers.

Spacer image of a penguin and some houses.

Answers

Answer 2

False. The actual output is shown in Figure 3 . The code in Listing 2 produces a tuple containing two other nested tuples. A nested tuple counts as only one element in the length of a tuplecontaining nested tuples.

Figure 3 . Question 2 actual output.
(1, 2) ('a', 'b')('A', (1, 2), 'B', ('a', 'b')) 4

Go back to Question 2

Answer 1

True.

Go back to Question 1

Miscellaneous

This section contains a variety of miscellaneous information.

Housekeeping material
  • Module name: Itse1359-1110r-Review
  • File: Itse1359-1110r.htm
  • Published: 10/19/14
  • Revised: 02/23/15
Disclaimers:

Financial : Although the Connexions site makes it possible for you to download aPDF file for this module at no charge, and also makes it possible for you to purchase a pre-printed version of the PDF file, youshould be aware that some of the HTML elements in this module may not translate well into PDF.

I also want you to know that, I receive no financial compensation from the Connexions website even if you purchase the PDF version ofthe module.

In the past, unknown individuals have copied my modules from cnx.org, converted them to Kindle books, and placed them for sale onAmazon.com showing me as the author. I neither receive compensation for those sales nor do I know who does receive compensation. If youpurchase such a book, please be aware that it is a copy of a module that is freely available on cnx.org and that it was made andpublished without my prior knowledge.

Affiliation : I am a professor of Computer Information Technology at Austin Community College in Austin, TX.

-end-

Questions & Answers

the art of managing the production, distribution and consumption.
Satangthem Reply
what is economics
Khawar Reply
okk
damfash
marginal utility is the additional satisfaction one derives from consuming additional unit of a good or service.
Fred
It's the allocation of scarce resources.
Fred
marginal utility please?
Dishan
marginal utility is the additional satisfaction one derives from consuming additional unit of a good or service.
Fred
I know the definition, but I don't understand its meaning.
Dishan
what is the must definition of economic please?
Nurudeen
demand lfs
Alpha
Economics is derived from the word Oikonomia which means management of household things. Thus, Economics is a study of household things with the constrains of allocating scare resources.
Dishan
what is Open Market Operation
Adu Reply
dominating middlemen men activities circumstances
Christy Reply
what Equilibrium price
Adji Reply
what is gap
mirwais
who is good with the indifference curve
Dexter
What is diseconomic
Alixe Reply
what are the types of goods
WARIDI
how can price determination be the central problem of micro economics
simon Reply
marginal cost formula
Nandu Reply
you should differentiate the total cost function in order to get marginal cost function then you can get marginal cost from it
boniphace
What about total cost
Foday
ok
Foday
how can price determination be the central problem if micro economics
simon
formula of cross elasticity of demand
Theresia Reply
what is ceteris paribus
Priyanka Reply
what is ceteris parabus
Priyanka
Ceteris paribus - Literally, "other things being equal"; usually used in economics to indicate that all variables except the ones specified are assumed not to change.
Abdullah
What is broker
scor
land is natural resources that is made by nature
scor
What is broker
scor
what is land
kafui
What is broker
scor
land is natural resources that is made by nature
scor
whats poppina nigga turn it up for a minute get it
amarsyaheed Reply
what is this?
Philo
am from nigeria@ pilo
Frank
am from nigeria@ pilo
Frank
so
owusu
what is production possibility frontier
owusu
it's a summary of opportunity cost depicted on a curve.
okhiria
please help me solve this question with the aid of appropriate diagrams explain how each of the following changes will affect the market price and quantity of bread 1. A
Manuela Reply
please l need past question about economics
Prosper Reply
ok let me know some of the questions please.
Effah
ok am not wit some if den nw buh by tommorow I shall get Dem
adepojurafiu
Hi guys can I get Adam Smith's WEALTH OF NATIONS fo sale?
Ukpen
hello I'm Babaisa alhaji Mustapha. I'm studying Economics in the university of Maiduguri
Babaisa
okay
Humaira
my name is faisal Yahaya. i studied economics at Kaduna state university before proceeding to West African union university benin republic for masters
Faisal
Hi guys..I am from Bangladesh..
Mannan
Wat d meaning of management
igwe Reply
disaster management cycle
Gogul Reply
cooperate social responsibility
igwe
Fedric Wilson Taylor also define management as the act of knowing what to do and seeing that it is done in the best and cheapest way
OLANIYI
A soccer field is a rectangle 130 meters wide and 110 meters long. The coach asks players to run from one corner to the other corner diagonally across. What is that distance, to the nearest tenths place.
Kimberly Reply
Jeannette has $5 and $10 bills in her wallet. The number of fives is three more than six times the number of tens. Let t represent the number of tens. Write an expression for the number of fives.
August Reply
What is the expressiin for seven less than four times the number of nickels
Leonardo Reply
How do i figure this problem out.
how do you translate this in Algebraic Expressions
linda Reply
why surface tension is zero at critical temperature
Shanjida
I think if critical temperature denote high temperature then a liquid stats boils that time the water stats to evaporate so some moles of h2o to up and due to high temp the bonding break they have low density so it can be a reason
s.
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
Difference between extinct and extici spicies
Amanpreet Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!





Source:  OpenStax, Itse 1359 introduction to scripting languages: python. OpenStax CNX. Jan 22, 2016 Download for free at https://legacy.cnx.org/content/col11713/1.32
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Itse 1359 introduction to scripting languages: python' conversation and receive update notifications?

Ask