Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This program plays a simple game, where it as ks the player about their dog, and attempts to guess the dogs breed based on their

This program plays a simple game, where it as

ks the player about their dog,

and attempts to guess

the dogs breed based on their answers. For

simplicitys sake, there are only five possible dog breeds.

(

WARNING

: This part of the homework is the most challenging, so budget

plenty of time and brain p

ower. And read the instructions carefully!)

The program can ask the player about four characteristics. It should ask the

minimum

number of questions needed to guess the dogs breed.

(HINT: It should need to ask

no less

than two questions and

no more

tha

n

three questions to find the right breed.)

Do the dogs ears stick up

?

Does

the dog come in multiple colors

?

Can the dog bark

?

Does the dog have a curly tail?

For these inputs, the program can assume the following:

The user will only ever enter either lo

wercase

y

es

(for yes)

or lowercase

n

o

(for no)

Based on the users responses, the program must select the correct breed

and print it to the screen. Here are the possibilities for the dog breeds:

Dog has a curly tail and can bark:

Eurasier

Dog has a

curly tail and

cannot

bark:

Basenji

Dog does

not

have a curly tail and its ears stick up:

Pharaoh Hound

Dog does

not

have a curly tail, its ears do

not

stick up, and it does

come in multiple colors:

Chesapeake Bay Retriever

Dog does

not

have a curly tail,

its ears do

not

stick up, and it does

not

come in multiple colors:

Maremma Sheepdog

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

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago