Access over 20 million homework & study documents

search

Mod 1 mastery ex attempt 1

Content type
User Generated
Rating
Showing Page:
1/5
Score for this attempt: 4 out of 10
Submitted Jan 17 at 6:30pm
This attempt took 17 minutes.
IncorrectQuestion 1
0 / 1 pts
3 * 2 ** 2 + 1 is _________.
24
37
13
216
Actually, look again. Run this expression in a Python console window. Be sure to apply
the order of precedence for the operations correctly.
IncorrectQuestion 2
0 / 1 pts
Which statement is a valid dictionary declaration in Python?
stock = {‘name’ : ‘GM’,‘shares’ : 100,‘price’ : 314.59}
stock = {‘name’ = ‘GM’,‘shares’ = 100,‘price’ = 314.59}
stock = [‘name’ : ‘GM’,‘shares’ : 100,‘price’ : 314.59]
stock = [‘name’ = ‘GM’,‘shares’ = 100,‘price’ = 314.59]

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/5
Actually, look again. See the definition of a Python dictionary on Page III in Module 2 for
more information.
Question 3
1 / 1 pts
True or false? Python dictionaries can have duplicate keys and values.
True
False
Actually, Dictionary keys cannot be duplicated. See the definition of a Python dictionary on Page
III in Module 2 for more information.
IncorrectQuestion 4
0 / 1 pts
Let a = “Hello World”
The Python statement: a[1] = ‘h’ will result in _________:
the string “a” becoming “hello World”
the string “a” becoming “Hhllo World”
no change to the string
a program exception
Actually, look again. “a[1]” represents the second character in the strings. References to
characters in strings are zero-based. See the string example in the string subtopic on
Page 1 in Module 2.
IncorrectQuestion 5
0 / 1 pts
-2 % -3 is_________.

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/5

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 5 pages?
Access Now
Unformatted Attachment Preview
Score for this attempt: 4 out of 10 Submitted Jan 17 at 6:30pm This attempt took 17 minutes. IncorrectQuestion 1 0 / 1 pts 3 * 2 ** 2 + 1 is _________. 24 37 13 216 Actually, look again. Run this expression in a Python console window. Be sure to apply the order of precedence for the operations correctly. IncorrectQuestion 2 0 / 1 pts Which statement is a valid dictionary declaration in Python? stock = {‘name’ : ‘GM’,‘shares’ : 100,‘price’ : 314.59} stock = {‘name’ = ‘GM’,‘shares’ = 100,‘price’ = 314.59} stock = [‘name’ : ‘GM’,‘shares’ : 100,‘price’ : 314.59] stock = [‘name’ = ‘GM’,‘shares’ = 100,‘price’ = 314.59] Actually, look again. See the definition of a Python dictionary on Page III in Module 2 for more information. Question 3 1 / 1 pts True or false? Python dictionaries can have duplicate keys and values. True False Actually, Dictionary keys cannot be duplicated. See the definition of a Python dictionary on Page III in Module 2 for more information. IncorrectQuestion 4 0 / 1 pts Let a = “Hello World” The Python statement: a[1] = ‘h’ will result in _________: the string “a” becoming “hello World” the string “a” becoming “Hhllo World” no change to the string a program exception Actually, look again. “a[1]” represents the second character in the strings. References to characters in strings are zero-based. See the string example in the string subtopic on Page 1 in Mod ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Awesome! Perfect study aid.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4