Return To CS 110 Home

Colour Theme   Font Size Options
 
   
   
   
Drawing Multiple Cards

Drawing Multiple Cards


Video Summary: https://youtu.be/-DYxlhEPhqg


Consider this solution to a previous exercise, which generated a number between 1 and 13 and placed it in a box:


In this exercise, ask the user how many cards they would like to draw, and use a for loop to draw that amount. Make sure the user isn't just drawing the same card multiple times. Assume the user will always enter an integer.

When you are finished, your output might look like this:

How many cards would you like to draw?
3
-------
|     |
|  10 |
|     |
-------
-------
|     |
|  9  |
|     |
-------
-------
|     |
|  11 |
|     |
-------

Solution