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 option1. "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.

Answers

Answer 1

The code segment illustrates the use of conditional statements.

The execution of conditional statements is dependent on the truth value of its condition.

The required code segment is as follows:

if (rsvp == true && selection = 1){

      option1 = "Thanks for attending. You will be served beef.";

}

else{

option1 = "Sorry you can't make it.";

}

The flow of the above code segment is as follows:

Check if rsvp is true and selection is 1; if yes, "Thanks for attending....." is saved in option1If otherwise, "Sorry...." is saved in option1

The code segment submitted can be used for several programming languages such as Java, C++, C and C#.

Read more about similar programs at:

https://brainly.com/question/14166674


Related Questions

Como tomar captura en laptop?

Answers

Answer: En algunas laptops o PCs basta con presionar el botón Print Screen o Impr Pant, ubicado usualmente en la parte superior derecha del teclado. Se creará la carpeta de "capturas" automáticamente en Imágenes en PNG o JPG de tu ordenador. También puedes pulsar la tecla Windows junto a la tecla Impr Pant a la vez.

Explanation:

Answer:

para windows 10, encuentras el botón de windows, shift y s

Explanation:

How does the internet help you to improve your:
mental health
self esteem
Help you stay mentally active
Help you stay in contact with family

Like why is the internet useful and a good thing

Answers

Answer:

Help you mentally active

Explanation:

bcoz we can use internet in good ways

Helps you stay mentally active because it basically gives you something to do.

What is computer specification

Answers

Answer:

Computer hardware specifications are technical descriptions of the computer's components and capabilities. Processor speed, model and manufacturer. Processor speed is typically indicated in gigahertz (GHz). The higher the number, the faster the computer.

13. WHICH OF THE FOLLOWING IS INVOLVED IN CREATING A DOCUMENT? *

SAVING AND STORING
ENTERING TEXT
FORMATTING TEXT
ALL OF THE ABOV

Answers

Answer:

All of the above

Explanation:

Hope this helps...

What can you do in Microsoft Word 2016?

Answers

Answer:

write ?

Explanation:

Why is feedback from other people important when you create software?

Feedback connects your software to programming libraries.
Feedback helps you know what is good or bad about your program.
Feedback automatically fixes the errors in your code.
Feedback tells users how to use your software program in the right way.

Answers

The reason why feedback from other people is important when you create a software application (program) is: B. Feedback helps you know what is good or bad about your program.

Software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software programs (applications).

Basically, there are six (6) main stages involved in the creation of a software program and these are;

Planning.Analysis.Design.Development (coding).Deployment.Maintenance.

After the deployment of a software program, the developers usually take feedback from end users, so as to know what is good or bad about their program.

In conclusion, feedback is very important and essential for software developers because it help them to know what is good or bad about a software.

Read more: https://brainly.com/question/18369405

Answer:

k

Explanation:

What are two specific Netstumbler features that are related to cybersecurity? Name one feature that is related to improving cybersecurity and another that could be used by hackers for nefarious purposes. Explain your answers.

Answers

The feature that can improve cybersecurity is the detection of interferences, and the one that can be used by hackers is checking the configuration of networks.

Netstumbler is a program used to identify surround wireless networks. This program is mainly available for Window systems and includes the following features:

Detecting wireless networks.Detecting interferences.Checking the configuration of networks.

These features have both a positive and a negative side as they can be used to increase cybersecurity, which is positive, but they can also be used by hackers to attack networks and the devices in them.

One positive feature is the detection of interferences because this can be used to detect possible external or threatening networks. On the other hand, checking the configuration can be a negative feature because hackers can use this information to enter and hack the networks.

Learn more in:  https://brainly.com/question/17021829

How does net neutrality protect your information? Do they connect everyone into something?

Answers

Answer:

Net neutrality law focuses on regulating and/or preventing three main practices:

Blocking: ISPs cannot block or prevent access to any lawful content on the web.

Paid prioritization: Providers cannot prioritize companies or consumers who pay a premium for a “fast lane” and keep those who don’t pay in a “slow lane.”

Throttling: Providers cannot limit your bandwidth or slow your connection based on your internet activities.

Without net neutrality or other laws protecting equal content, ISPs could, in theory, block certain websites and favor others. For example, your internet provider could theoretically make Netflix slower in order to push you towards its cable TV service.

Or, Xfinity could allow their subscribers to stream Peacock content (which they own through NBCUniversal) for free, while charging subscribers for watching Netflix. With net neutrality, you would have free and equal access to both Peacock and Netflix.

Another example would be your ISP slowing your connection every time you try to game over Twitch, but speeding it back up again when you’re not gaming, a practice known as throttling.

Explanation:

Answer: Net neutrality rules prevent this by requiring ISPs to connect users to all lawful content on the internet equally, without giving preferential treatment to certain sites or services. In the absence of net neutrality, companies can buy priority access to ISP customers.

1. YOU CAN REVERSE AN UNDO ACTION BY CLICKING REDO. *

True
False

Answers

Answer:

if it's on the keyboard false

What format can be applied to text in Excel?

Answers

Answer:

You can apply accounting format,date,numbers, currency, percentage or even fraction

Explanation:

A column does not consist of
cells that are on the same
vertical line within a worksheet.
True
False
(microsoft excell)

Answers

Answer: false

Explanation:

columns are vertical, rows are horizontal

The statement "a column does not consist of cells that are on the same vertical line within a worksheet" is definitely false.

What is a vertical line of cells in a spreadsheet is called?

A vertical line of cells in a spreadsheet is called Gridline. Gridlines are the horizontal and vertical lines on the screen that separate cells in a spreadsheet. Columns run vertically in the worksheet, and the data goes from up to down. Column A is the first column in Excel.

While rows run horizontally in the worksheet. A row is a series of data put out horizontally in a table or spreadsheet, while a column is a vertical series of cells in a chart, table, or spreadsheet.

Therefore, the statement "a column does not consist of cells that are on the same vertical line within a worksheet" is definitely false.

To learn more about Columns and rows in the worksheet, refer to the link:

https://brainly.com/question/5940146

#SPJ2

what is the difference between ordered list and unordered list?

Answers

Answer:

In an ordered list, each item is displayed along with the numbers or letters instead of bullets

In an unordered list, each item is displayed with a bullet.

Provide 10 points for each question


What is Sophia (Robot) citizenship?

Why is Sophia (robot) a she and not a he

Features - what can Sophia (robots) do and not do, her limits

Public figure – why is she so popular in comparison to other robots

Events - name all events Sophia has spoken in

Controversy over hype in the scientific community – what are they

What is your opinion about Sophia, just a robot or human robot (explain your answer
with merits

Provide a legend of references and link it to each paragraph (cannot use Wikipedia
as a site) – foot note each references, even if it is in your own words

Answers

Answer:

1- Saudi arabia

Explanation:

Guys how much would it cost if i buy a brand mew ps4 pro 2tb?

Pls i need to know

Answers

Answer:

About $490 plus tax

Explanation:

Write a program that inputs the length of two pieces of fabric in feet and inches(as whole numbers) and prints the total

Answers

Converting from inches to feet requires a modulo operator.

The modulo operator returns the remainder of a division.

The program in Python, where comments are used to explain each line is as follows:

#This gets the input for feet

feet1 = int(input("Enter the Feet: "))

#This gets the input for inches

inch1 = int(input("Enter the Inches: "))

#This gets another input for feet

feet2 = int(input("Enter the Feet: "))

#This gets another input for inches

inch2 = int(input("Enter the Inches: "))

#This calculates the total inches, using the modulo operator

totalInches = (inch1 + inch2)%12

#This calculates the total feet

totalFeet = feet1 + feet2 + (inch1 + inch2)//12

#This prints the required output

print("Feet: {} Inches: {}".format(totalFeet,totalInches))

At the end of the program, the total feet and total inches are printed.

Read more about similar programs at:

https://brainly.com/question/13570855

When using a voltmeter the loading effect of the meter is very much considered, where the intended resistance of the voltmeter must be very high. Why do you think it should be this way?​

Answers

Answer:

The loading effect of a dc voltmeter refers to the phenomenon in which a negative error is produced in the voltmeter reading (measured voltage), due to the low internal resistance (i.e., low sensitivity of the voltmeter).

What is the value of x after running this code?

x = 0
for y in [1,2,3,4,5,6,7,8,9,10]:
x = x + y

Answers

counter = 1

sum = 0

while counter <= 6:

sum = sum + counter

counter = counter + 2

print(sum)

A. 12

B. 9

C. 7

D. 8

✔️ Correct! This loop executes 3 times. After the first loop sum = 1 and counter = 3, after the second loop sum = 4 and counter = 5, and after the third loop sum = 9 and counter = 7.

When the code runs it sums up the numbers, which results in 55. It says AFTER the code is finished so the answer will be 55. You can verify this by printing X again after the for loop

Which 2 tools are useful to remote employees and coworkers.

Answers

Two big useful tools are one, File Storage tools, and two, Project Management Tools.

When and why would you use a prefab?
Subject video gaming

Answers

Answer:

You should also use Prefabs when you want to instantiate GameObjects at runtime that did not exist in your Scene at the start - for example, to make powerups, special effects, projectiles, or NPCs appear at the right moments during gameplay.

who play back for blood?​

Answers

Answer:

who plays what for what...

What is the sixth generation of style. When writing a paper.

Answers

Answer:

Scribbr

Explanation:

Choose the term that best completes each sentence.

Using a _______ to write code is often a better option for a visually impaired programmer, since it tends to be more accessible than one with a ________ .

answer choices:
command line interface
graphical interface

Answers

Using a graphical interface to write code is often a better option for a visually impaired programmer, since it tends to be more accessible than one with a command line interface.

What is graphical user interface?

The Graphical User Interface is known to be a very common user Interface that is made up of Graphical representation such as buttons and icons.

In this interface, communication can be carried out through the use of interacting with the icons instead of the usual text-based or command-based communication. A good example of it is the Microsoft operating systems.

Learn more about graphical interface from

https://brainly.com/question/22811693

Because Brainly is such a big organization for students in need of help with their school work, I believe that it was either somehow reported or taken down by something. Every since even April 2020 and earlier, Brainly has been having issues with letting people register, and now they took down all of their ad's too. Although, it was helpful to many people, it was probably for a benefit. Who agrees?

Answers

Answer:

I agree

Explanation:

Select the correct answer.

Which of these statement(s) is true about comments in Java?

A.
Single-line comments "comment out" only one line in a program.

B.
Single-line comments can be used only once in a single program.

C.
Multi-line comments start and end with //.

D.
Single-line comments start with /* and end with */ on the same line.

Answers

Answer:

b multi line comments can be used only once in a single program.

Java single-line comments are marked with /* and */ and can be used to comment out one or multiple lines.

Hence, option D is correct.

In Java, single-line comments are denoted by the symbols /* and */, allowing you to comment out one or more lines in your code.

This feature is useful for temporarily disabling code or providing explanations within your program.

On the other hand,

Multi-line comments in Java are enclosed by /* at the beginning and */ at the end, enabling you to comment out larger sections of code or provide detailed explanations that span multiple lines.

To learn more about programming visit:

https://brainly.com/question/14368396

#SPJ3

Please helpp:)
To save your HTML document you should save it as

.html
Or
.txt

Answers

Answer:

.html

Explanation:

Which formula calculates the total value of a single row of cells across a range of columns in excel

Answers

The formula which calculates the total value of a single row of cells across a range of columns in Microsoft Excel is: =SUM(C15:Y15).

Microsoft Excel can be defined as a software program (application) that is typically designed and developed by Microsoft Inc., to avail its end users the ability to analyze and visualize spreadsheet documents.

A spreadsheet can be defined as a file or document which comprises cells in a tabulated format (rows and columns), that are typically used for formatting, arranging, analyzing, storing, calculating and sorting data on computer systems through the use of Microsoft Excel.

In Microsoft Excel, the SUMIF function is a function which is used to calculate the total value of cells that meet a specific criteria such as:

Text.Dates.Numbers.

Hence, "=SUM(C15:Y15)" is a formula which can be used to calculate the total value of a single row of cells across a range of columns in Microsoft Excel.

Read more: https://brainly.com/question/24249483

who want to play quzzies the code is 124 3142

Answers

Answer:

22

Explanation:

11+11=22

Why hasn't 3D printing been more publicly used?

Answers

Answer:

Probably because it's really expensive and not well known.

Explanation:

Some metals and plastic are not able to be altered for 3D printing, which makes this harder for some people to get hold of. Most of the materials are also not able to be recycled, which makes it harder.

difference between nintendo switch and switch lite

Answers

Answer:

thank you sa point labyu stay safe

Answer: The switch lite is the one you can't dock onto your tv and is mostly used for handheld purposes, also you can't take off the controllers.

Explanation:

What approach do you prefer to take when creating presentations for class projects? Would you rather use software or create presentation materials by hand? Explain your answers.

Answers

Answer:

when creating presentations it is easier to follow a software because it is reliable and establishes status. Although a more manual method can be used too. now the rest depends on your skills. If I were to make a presentation I would use a software as it makes my work flow more efficient and easy

Explanation:

use a software is much much better because it can save your time make your works more afficient and easier

Other Questions
Please help me with number 8 I'm doing an essay but I need help with the conclusionIt's about Was Cortes justified in conquering the Aztec Empire? Signing would most likely be used in which of the following scenarios?among Deaf family members who all live on an isolated islandO among a group of friends signing to each other afterschoolby an ASL teacher visiting the home of one of their studentsO by a Hard of Hearing person communicating with a Hearing person The NATO alliance involved all USSR countries to defend against Western European and American powers. True or false Read the blog entry below and answer the question that follows:At first I dreaded going to sixth grade camp. I was sure the food would be poisonous, I would freeze to death in my sleeping bag, and the other kids in my cabin would never talk to me. But was I wrong! In fact, it was the best week ever! I went horseback riding and participated in a ropes activity with a zip line course. After the course, I climbed to the top of a pole using only ropes and carabiner clips, and then I rappelled off the top. I even made a new best friend. Oh, by the way, the food was delicious. It tasted better than my mom's! (But don't tell her.)Review the following sentence.And the food was delicious.If the author wanted to convey a connotation that has a more positive shade of meaning, which of the following words could replace delicious? (5 points)RepulsiveUnappealingDelectableBlandneed answer my 1:49 -3/5 is greater than or less than -4/5 At the movies, children's tickets are $6 each and adults' tickets are $10 each. Shandra buys 14 tickets. Let be the number of adults going to the movies. Enter an algebraic expression in the box to represent the total price Shandra pays. Do not include the dollar sign in your answer. Help help help help help help help Sharon reads two different articles about avocados. The first article, in a weight-loss magazine, claims that avocados are unhealthy because they are high in fat. The second article, in an annual publication from a doctors group, claims that the fat in avocados is a type that is good for the heart.To assess these claims, which question might Sharon ask?Which source do avocados come from?Where are avocados sold?Is the source an authority on the subject?How much do avocados cost? Layla painted 5/9 of a wall and Tim painted 6/7 of a wall. How much if the wall do they have left to paint? ASAP! WILL MARK BRAINLIEST + 100 POINTS!!Match each word to its description. Match each of theses periods of Ancient Greek art with the technique that was developed during that period Which of the following steps is required before biological processes can break down organic material in wastewater? Aeration basins Primary clarifiers Filtration Disinfection which expression has the fewest number of significant figures? a. 360b. 18.3c. 296.54d. 5,280 list all important land use zones How does Gregor feel about his job En que lugares de la ciudad de buenos aires, argentina hay wifi gratis? Bryon purchased a box of candy at the store. On his way home he ate 1/4 of the candy from the box. At dinner with friends later that night he served 1/2 of what was left. If there are 6 chocolates left in the box, how many did the box contain to start with? How did President Nixon develop a better relationship with the People'sRepublic of China Someone please help its due soon.. Wilde River Highschool and Oakview Mills High Schol played each other in a football game for the country Championship. Going into the 4th quarter, the teams were tied 21-21. Based on the following statistics in the 4th quarter, make an argument for which team you predict to win. Be sure to include mathematical reasoning in your argument.Gains- Closer to scoringLoses- Farther from scoring SOMEONE PLEASE HELPPOOO