Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pawn =1, Bishop=3, Knight =3, Rook=5, Queen=9 Write the program so that no more than 8 pawns, 2 knights, 2 bishops, 2 rooks, or 1

Pawn =1, Bishop=3, Knight =3, Rook=5, Queen=9

Write the program so that no more than 8 pawns, 2 knights, 2 bishops, 2 rooks, or 1 queen will be accepted as valid input. The "king" will cause the program to quit. Example:

Please input the name of each chess piece (pawn, knight, bishop, rook, queen or king). Inputting king will end the program.

Enter the name of piece 1: rook

A rook is 5 point(s). Your total is 5 point(s).

Enter the name of piece 2: rook

A rook is 5 point(s). Your total is 10 point(s).

Enter the name of piece 3: rook

Invalid piece name; there are no more rooks.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

Consider this article:...

Answered: 1 week ago

Question

4. What sales experience have you had?

Answered: 1 week ago