Question: Please help me write this code using PYTHON!!! PROBLEM 3: Einz Function Name: pickup() Parameters: hand a list of strings discard a list of strings

Please help me write this code using PYTHON!!!

PROBLEM 3: Einz Function Name: pickup() Parameters: hand a list of strings

PROBLEM 3: Einz Function Name: pickup() Parameters: hand a list of strings discard a list of strings Return Value: None Description: You are playing the hit German card game with your friends, Einz. Each card in this game has a number 1-9 and a color: red, blue, green, or yellow (i.e. "red 1", "blue 8", etc). The rules of the game are pretty hard to explain, but all you need to know is that if the cards in your hand are in increasing order and the cards in the discard pile are also in increasing order, you have to pick up the discard pile and add it to your hand. Write a function that simulates this game rule and prints out your new hand. For the sake of simplicity, assume both your hand and the discard pile are already in increasing order. Test Cases: >>> pickup (["red 2","blue 4"], ["green 1","yellow 6", "red 9"]) Your new hand is red 2, blue 4, green 1, yellow 6, red 9. >>> pickup (["green 4","yellow 5"], ["red 4","blue 7"]) Your new hand is green 4, yellow 5, red 4, blue 7.

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 Programming Questions!