-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lecture "Organising information: unordered structures", exercise 1 #20
Comments
my_set = set() |
|
hobbits = set() #create an empty set and associate it to "hobbits" variable |
set_tolkien= () Current status of set_tolkien: ({"Bilbo", "Frodo", "Sam", "Pippin", "Merry"}) |
1 | protagonists=set() Final set, containing ["Bilbo", "Merry", "Sam", "Pippin","Frodo"] |
my_set = set() print(my_set) #my_set = ({"Bilbo", "Frodo", "Sam", "Pippin", "Merry"}) |
|
|
my_name_set = set() |
my_set = set() |
sauron_set = set() |
|
hobbitset=set() print(hobbitset) |
|
my_set = set() print(my_set) #my_set: {'Pippin', 'Sam', 'Frodo', 'Bilbo', 'Merry'} |
my_set = set() print (my_set) |
my_set = set() print(my_set) |
my_hobbits = set() |
the_hobbits = set() # this creates a new set # adding elements to the set without any particular order print(the_hobbits) Output: the_hobbits{'Sam', 'Frodo', 'Bilbo', 'Merry', 'Pippin'} |
Write a pseudocode in Python so as to create a set of the following elements:
"Bilbo"
,"Frodo"
,"Sam"
,"Pippin"
,"Merry"
.The text was updated successfully, but these errors were encountered: