(Latest Update )
Introduction to Programming in
Python | All chapters Questions and
Answers | Grade A | 100% Correct -
WGU
Question:
how to write set literal
Answer:
set{} with commas separating set elements
Question:
how do you create a dictionary object
Answer:
surround the key:value pairs with braces EX: {'Leeloo': 4, 'Jetson': 12)
,Question:
a Python container used to describe associative relationships
Answer:
dictionary
used for associating two things such as student and ID, name and address
Question:
allows a programmer to create a string with placeholder expressions that are
evaluated as the program executes
Answer:
formatted string literal
aka f-string
print(f'{number} burritos cost ${amount}')
Question:
allows a value's formatting in the string to be customized
Answer:
format specification
, Question:
A branch's statements can include any valid statements, including another if-
else statement, which are known as...
Answer:
nested if-else
Question:
One common programming task involves determining whether a specific
value can be found within a container, such as a list or dictionary. The in and
not in operators yield True or False if the left operand matches the value of
some element in the right operand, which is always a container.
Answer:
membership operators
Question:
to determine whether two variables are the same object what operator is used
Answer:
'is'