logo Use SA10RAM to get 10%* Discount.
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Debra StephensonnBusiness
(5/5)

526 Answers

Hire Me
expert
Cole GrayyEconomics
(5/5)

548 Answers

Hire Me
expert
StatAnalytica ExpertSocial sciences
(5/5)

916 Answers

Hire Me
expert
Jesse RossResume writing
(5/5)

808 Answers

Hire Me
Python Programming

DigiPeg Solitaire, the user can specify how many rows [1-9] and how many columns [1-9] the board should have. pegs can jump over an adjacent peg into an empty space.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Four empty functions in a Python program - everything else is written and cannot be changed.  Output must be able to match the attached transcripts.

How it's supposed to work:

In DigiPeg Solitaire, the user can specify how many rows [1-9] and how many columns [1-9] the board should have.

In DigiPeg Solitaire, pegs can jump over an adjacent peg into an empty space. The jumping peg, the adjacent peg, and the empty space must be in a straight line as in Peg Triangle Solitaire. The potential direction for a peg to jump is over, under, left, or right.

When a jump is made the adjacent peg (the peg that was jumped over) is removed.

The game is over when no more moves are possible.

When 2 or fewer pegs remain when the game ends, the message "You're a DigiPeg Genius!"

When 3 or 4 pegs remain, the message "Not too shabby, rookie."

When 5 or 6 pegs remain, the message "That's nothing to write home about."

When 7 or more pegs remain, the message "You're a DigiPeg Igno-Ra-Moose"

 

 

Python 3.8.2 (v3.8.2:7b3ab5921f) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
=== RESTART: /Users/danieldefrance/Desktop/program5/Daniel-DeFrance-Prog5.py ===
Welcome to Peg Rectangle Solitaire!
-----------------------------------

Enter the number of rows [1 - 9]: 4
Enter the number of columns [1 - 9]: 4
Enter the empty space row [1 - 4]: 2
Enter empty space column [1 - 4]: 2

    1   2   3   4  
  +---+---+---+---+
1 | o | o | o | o |
  +---+---+---+---+
2 | o |   | o | o |
  +---+---+---+---+
3 | o | o | o | o |
  +---+---+---+---+
4 | o | o | o | o |
  +---+---+---+---+

Enter the row of the peg to move [1 - 4]: 2
Enter the column of the peg to move [1 - 4]: 4
Enter the row where the peg lands [1 - 4]: 2
Enter the column where the peg lands [1 - 4]: 2

    1   2   3   4  
  +---+---+---+---+
1 | o | o | o | o |
  +---+---+---+---+
2 | o | o |   |   |
  +---+---+---+---+
3 | o | o | o | o |
  +---+---+---+---+
4 | o | o | o | o |
  +---+---+---+---+

Enter the row of the peg to move [1 - 4]: 2
Enter the column of the peg to move [1 - 4]: 1
Enter the row where the peg lands [1 - 4]: 2
Enter the column where the peg lands [1 - 4]: 3

    1   2   3   4  
  +---+---+---+---+
1 | o | o | o | o |
  +---+---+---+---+
2 |   |   | o |   |
  +---+---+---+---+
3 | o | o | o | o |
  +---+---+---+---+
4 | o | o | o | o |
  +---+---+---+---+

Enter the row of the peg to move [1 - 4]: 4
Enter the column of the peg to move [1 - 4]: 1
Enter the row where the peg lands [1 - 4]: 1
Enter the column where the peg lands [1 - 4]: 1
Sorry.  That move is not allowed.

    1   2   3   4  
  +---+---+---+---+
1 | o | o | o | o |
  +---+---+---+---+
2 |   |   | o |   |
  +---+---+---+---+
3 | o | o | o | o |
  +---+---+---+---+
4 | o | o | o | o |
  +---+---+---+---+

Enter the row of the peg to move [1 - 4]: 4
Enter the column of the peg to move [1 - 4]: 1
Enter the row where the peg lands [1 - 4]: 2
Enter the column where the peg lands [1 - 4]: 1

    1   2   3   4  
  +---+---+---+---+
1 | o | o | o | o |
  +---+---+---+---+
2 | o |   | o |   |
  +---+---+---+---+
3 |   | o | o | o |
  +---+---+---+---+
4 |   | o | o | o |
  +---+---+---+---+

Enter the row of the peg to move [1 - 4]: 3
Enter the column of the peg to move [1 - 4]: 3
Enter the row where the peg lands [1 - 4]: 3
Enter the column where the peg lands [1 - 4]: 1

    1   2   3   4  
  +---+---+---+---+
1 | o | o | o | o |
  +---+---+---+---+
2 | o |   | o |   |
  +---+---+---+---+
3 | o |   |   | o |
  +---+---+---+---+
4 |   | o | o | o |
  +---+---+---+---+

Enter the row of the peg to move [1 - 4]: 1
Enter the column of the peg to move [1 - 4]: 3
Enter the row where the peg lands [1 - 4]: 3
Enter the column where the peg lands [1 - 4]: 3

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme

Get Free Quote!

440 Experts Online