Underneath the starter code below, create a for loop that will iterate through every word in the key_word list. Make sure you give your iterator variable a good name, as you will need it to refer to each keyword as you iterate through the list.
In this level, you need to sort grades into categories of A, B, C, D and F. The grades need to be separated as follows: A >= 90, 90 > B >= 75, 75 > C >= 60, 60 > D >= 50, 50 > F
Inside the for loop write code that will appropriately determine the letter grade that goes with the random numeric grade. You will want to use a chained conditional (if-elif-elif) type of structure to check for the different grade levels. For each level, print out the numeric and associated letter grade.
In this level you will create a game of chance, similar to the card game war. Two players will have a random number generated from 1 to 52 (inclusive), the player with the higher number will win the point. In the case of a tie, a point is awarded to both players. 26 rounds will be played, after which the winner will be displayed.
Inside this loop, create two more variables (one for player 1βs card and one for player 2βs card) and assign them random values ranging from 1 to 52 (inclusive), using the randrange function. This represents the 52 cards in a standard deck of cards.
Still inside the loop, create a chained conditional statement that responds to three possible states for this card round: if player 1βs card was higher, if player 2βs card was higher, or if it was a tie. Inside each branch of this chained conditional there should be a print statement printing out who got the point (see sample screenshot at the bottom of the level). Inside each branch, you also need to assign points to the winner of each round by incrementing player1βs points, or player2βs points. In the case of a tie, they should both get a point.
After the for loop, we want to check to see who won the game. Similar to step 4, we need a chained conditional statement to check if player 1 has the most points, or if player 2 has the most points, or if it is a tie. Inside each branch of this chained conditional there should be a print statement printing out the winner and their final score (see sample photo at the bottom of the level)
Bonus: Organizing output is just as important as organizing code! Add round numbers before each round, a blank line after each round and indent the print statements for each round. (See sample output below)