<< Chapter < Page Chapter >> Page >
This module contains review questions and answers keyed to the module titled Itse1359-1100-Indexing and Slicing Tuples.

Table of contents


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-1100-Indexing and Slicing 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.)


Question 1

True or False? A tuple is like a list whose values cannot be modified. A tuple is immutable .

Go to answer 1

Question 2

True or False? A tuple is an ordered collections of arbitrary objects.

Go to answer 2

Question 3

True or False? Tuples work exactly like lists, except that tuples can't be changed in place (they're immutable).

Go to answer 3

Question 4

True or False? Tuples use square brackets for containment.

Go to answer 4

Question 5

True or False? A tuple is a sequence .

Go to answer 5

Question 6

True or False? Tuples can contain other compound objects, including lists, dictionaries, and other tuples. Hence, tuples can be nested.

Go to answer 6

Question 7

True or False? Because a tuple is immutable, the values contained in the objects that are referred to by the contents of the tuple cannot be changed.

Go to answer 7

Question 8

True or False? Just like with a list, the append method can be called to add new items to a tuple.

Go to answer 8

Question 9

True or False? As with strings and lists, items in a tuple are accessed using a numeric index. The first item in a tuple is at index value 0.

Go to answer 9

Question 10

True or False? From a syntax viewpoint, you always create a tuple by placing a sequence of items inside a pair of enclosing parentheses and separating themby commas.

Go to answer 10

Question 11

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

Listing 1 . Question 11 code.
aTuple = 3.14,59,"A string",1024 print(aTuple)
Figure 1 . Question 11 possible output.
3.14, 59, 'A string', 1024

Go to answer 11

Question 12

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

Listing 2 . Question 12 code.
# File 1359-1100r-12.py #-------------------------------aTuple = 3.14,59,"A string",1024 print(aTuple[4])
Figure 3 . Question 12 possible output.

Go to answer 12

Question 13

True or False? The code in Listing 3 produces the output shown in Figure 5 .

Listing 3 . Question 13 code.
aTuple = 3.14,59,"A string",1024 print(aTuple[1:3])

Questions & Answers

what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
characteristics of micro business
for teaching engĺish at school how nano technology help us
Do somebody tell me a best nano engineering book for beginners?
s. Reply
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
what is the actual application of fullerenes nowadays?
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
is Bucky paper clear?
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Do you know which machine is used to that process?
how to fabricate graphene ink ?
for screen printed electrodes ?
What is lattice structure?
s. Reply
of graphene you mean?
or in general
in general
Graphene has a hexagonal structure
On having this app for quite a bit time, Haven't realised there's a chat room in it.
what is biological synthesis of nanoparticles
Sanket Reply
what's the easiest and fastest way to the synthesize AgNP?
Damian Reply
types of nano material
abeetha Reply
I start with an easy one. carbon nanotubes woven into a long filament like a string
many many of nanotubes
what is the k.e before it land
what is the function of carbon nanotubes?
I'm interested in nanotube
what is nanomaterials​ and their applications of sensors.
Ramkumar Reply
what is nano technology
Sravani Reply
what is system testing?
preparation of nanomaterial
Victor Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
QuizOver.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?