Skip to content

MatinQurban/CS1C-Assignment1_DeckOfCards_PerfectShuffle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

Matin Qurbanzadeh CS1C Assignment 1:

Deck of Cards -- Perfect Shuffle

  1. Write a class that will represent a card in a standard deck of playing cards. You will need to represent both the suit (clubs, diamonds, hearts or spades) as well as the rank (A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2) of each card.

  2. Write methods to • Initialize the deck of cards • Perform a perfect shuffle • In a perfect shuffle, the deck is broken exactly in half and rearranged so that the first card is followed by the 27th card, followed by the second card, followed by the 28 th card, and so on. • Print the deck of cards • Compare two decks of cards

  3. Print out the initial, the deck after the first perfect shuffle, and the final deck.

  4. Print out how many perfect shuffles are necessary to return the deck to its original configuration.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published