Annalise W.

asked • 03/31/20

Write a code segment that will store a dinner selection in option1 based on the values of rsvp and selection. The intended behavior of the code segment is described below.

Write a code segment that will store a dinner selection in option1 based on the values of

rsvp and selection. The intended behavior of the code segment is described below.

If rsvp is true, the code segment should store in option1 a string indicating the person's

attendance and food choice. For example, if rsvp is true and selection is 1, the following

string should be stored in optioni.

"Thanks for attending. You will be served beef."

If rsvp is false, the following string should be stored in option1, regardless of the value of

selection.

"Sorry you can't make it."

Write the code segment below. Your code segment should meet all specifications and conform

to the examples.


Milad G.

Hi, Please clarify what programming language this assignment is for, and if any skeleton code or extra information is given, for example, it seems like there should be list of information given about numerical option values that correspond to dinner choices, please provide those as well and if they are presented in some sort of predefined list by the program or the problem set.
Report

04/01/20

2 Answers By Expert Tutors

By:

Dorothy P. answered • 04/01/20

Tutor
4.7 (54)

Software Engineer, Game Developer, Math and Humanities Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.