Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What we want to do is... Design a program that will reply to any yes or no question with a randomly chosen answer. Strategy When

image text in transcribed
image text in transcribed
image text in transcribed
What we want to do is... Design a program that will reply to any yes or no question with a randomly chosen answer. Strategy When a person uses your program, the program should do the following: 1. Prompt the person to ask a yeso question The program will randomly choose from 3 prompts: What question do you ask of me? What is that you want now? . What do you need to know? Once the user has typed in a question, you may discard it no need to store it anywhdre, as it will never be used 2. Output 1 message to the person from 4 possible messages . As I see it, yes. Most likely not Better not tell you now Reply hazy, try again later. Example 1: Output: What question do you ask of me? Input: Will there ever be a Community movie? 11:07 LTE d21.pdx.edu - #3X In this assignment you will use the follow programing skills; Input Output Variables Randon Numbers If/Else/Elif Statements In the 1950s, no one had Google to answer all of these questions. However, at that time there was another source of knowledge the Magic 8-ball. The Magic-8 ball was and still is) a popular fortune-telling toy. It's a giant 8-ball with small window on one side. You ask the B-ball yes-ar-no question and turn it over to see the response. The window randomly reveals a positive negative, se evasive essage Your goal, design a simple program that behaves like the regte -Ball What we want to do is Design a progran that will reply to any yes or no cuestion with a randomly chosen answer Strategy then a person uses your program, the program should do the following: 1) Prompt the person to ask yeso question The program will randomly choose from 3 prompts: What question de you ask of me? . What is that you want now? What do you need to know? Once the user has typed in a question, you may discard it no need to store it anywhere, as it will never be used 2) Output 1 message to the person from the messages As I see it, yes. Most likely not Better not tell you ne Reply hary, try again later. Exale 1: 20000000000000 A few Reply for a WILLE Fall On the free

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

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions