Two students are trying to combine their decks of Battleémon cards (a knock off version of another famous card game) so that they make one large deck of cards that contains exactly one of each unique type of Battleémon card that they own - in alphabetical order. In order to do this, the students start with two lists, deck1 and deck2, which are lists of all Battleémon cards each student owns (duplicates included) and the following available procedures.

Respuesta :

Answer:

combinedDeck ← Add(deck1, deck2)

combinedDeck ← RemoveDups(combinedDeck)

combinedDeck ← Alphabetize(combinedDeck)

Explanation:

fichoh

Uisng a the set of instructions below, a list of sorted cards without duplicates can be obtained by following the set of instructions below :

1. START

2. Read in cards of student A and student B into a set :

3. Using the union function merge, the two set of cards.

4. Since a set will contain no duplicates, then duplicate cards are automatically removed.

5. Convert the set to a list and apply the sort function.

A code snippet in python is given below :

card_A = {'meal', 'peal', 'deal', 'spin'}

#enter the values of student's A card into a set

card_B= {'skill', 'lift', 'spin'}

#Enter the values of student's B's card into a set

merge = card_A.union(card_B)

#using the union function, merge the cards

merge = list(merge)

#convert the mergers set into a list

sorted_cards = sorted(merge)

#using the sorted function, sort the values in the merged cards

print(sorted_cards)

#display the sorted cards

Learn more :https://brainly.com/question/15745784