Question: Goal: Learn to dynamically create a set. Assignment: Assume the variable data refers to a string. Write code that creates a set of all the

Goal: Learn to dynamically create a set.
Assignment: Assume the variable data refers to a string. Write code that creates a set of all the
digits in data. The set should only contain integer values. Assign the set to the variable digits.
Question 3
Feedback
More information
No output.
Feedback:
Expected variable 'digits' to exist Goal: Learn to remove elements from a set.
Assignment: Write a statement that removes 5 from the set data, but does not fail it it's not
present.
1 data ={1,2,3,4,5}
2 data.discard(5)
Question 2
Feedback
More information
No output.
Feedback:
Expected data to equal '{8,2,4,6}' but got '{1,2,3,4}'
 Goal: Learn to dynamically create a set. Assignment: Assume the variable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!