Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Consider the program snippet and select the correct answer for the output: : MItuple = ('MI', 'Michigan', 'Lansing') CAtuple = ('CA', 'California', 'Sacramento') TXtuple

1)

Consider the program snippet and select the correct answer for the output:

:

MItuple = ('MI', 'Michigan', 'Lansing')

CAtuple = ('CA', 'California', 'Sacramento')

TXtuple = ('TX', 'Texas', 'Austin')

states = [MItuple, CAtuple, TXtuple] # this will create a list of tuples

print(states[1][1:])

Group of answer choices

A) ('CA', 'California', 'Sacramento')

B) ('Texas', 'Austin')

C) ('California', 'Sacramento')

D) ('Michigan', 'Lansing')

2) Consider the following snippet:

abbrev = {} abbrev['MI'] = "Michigan" abbrev['MN'] = "Minnesota" abbrev['TX'] = "Texas" abbrev['CA'] = "California"

print(abbrev.keys())

Group of answer choices

A) keys(['MI', 'MN', 'TX', 'CA'])

B) ['MI', 'MN', 'TX', 'CA']

C) dict_keys([MI, MN, TX, CA])

D) dict_keys(['MI', 'MN', 'TX', 'CA'])

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

The Core Ios Developer S Cookbook Core Recipes For Programmers

Authors: Erica Sadun ,Rich Wardwell

5th Edition

0321948106, 978-0321948106

Students also viewed these Programming questions