Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using python 3: def circleInfo(r): Return (circumference, area) of a circle of radius r c = 2 * 3.14159 * r a =

using python 3:

def circleInfo(r): """ Return (circumference, area) of a circle of radius r """ c = 2 * 3.14159 * r a = 3.14159 * r * r return (c, a)

(circum, area) = circleInfo(10) print('area =', area) print('circumference =', circum)

t = circleInfo(10) print(t)

on next line after print(t) use the index operator (two times) to print the two elements of the tuple.

2.

actress = ( ("Julia", "Roberts"), (8, "October", 1967), [ ("Duplicity", 2009), ("Notting Hill", 1999), ("Pretty Woman", 1990), ("Erin Brockovich", 2000), ("Eat Pray Love", 2010), ("Mona Lisa Smile", 2003) ], ("Atlanta", "Georgia") )

print(type(actress[1])) print(actress[1]) for movies in actress:==line 12 print(actress[2:])

On new line (the body of the loop), display only the title of the movie. Run.

On line 12, append the movie (Oceans Twelve, 2004) to the list. Run and notice that, even though the tuple is immutable, we can change its list which is mutable.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 International Workshops Gdm Benchmarx Mcis Snsmw Diew Udm Tsukuba Japan April 2010 Revised Selected Papers Lncs 6193

Authors: Masatoshi Yoshikawa ,Xiaofeng Meng ,Takayuki Yumoto ,Qiang Ma ,Lifeng Sun ,Chiemi Watanabe

2010th Edition

3642145884, 978-3642145889

More Books

Students also viewed these Databases questions

Question

The feeling of boredom.

Answered: 1 week ago

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago

Question

Explain the various techniques of training and development.

Answered: 1 week ago

Question

Explain the various techniques of Management Development.

Answered: 1 week ago

Question

7-16 Compare Web 2.0 and Web 3.0.

Answered: 1 week ago