I need to know how to input this into python on zybooks. I've been stuck on this for days and I keep running into "invalid syntax" or "unknown word red" Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part. Ex: If the input is 130 50 130, the output is: 80 0 80 Find the smallest value, and then subtract it from all three values, thus removing the gray.

Answers

Answer 1

Answer:

Here is the C++ program:  

#include <iostream>   //to use input output functions  

using namespace std;   //to identify objects cin cout  

int main() {   //start of main method  

int red,green,blue,smallest;   //declare variables to store integer values of red,green, blue and to store the smallest value  

cout<<"Enter value for red: ";  //prompts user to enter value for red  

cin>>red;  //reads value for red from user  

cout<<"Enter value for green: ";  //prompts user to enter value for green  

cin>>green;  //reads value for green from user  

cout<<"Enter value for blue: "; //prompts user to enter value for blue  

cin>>blue;   //reads value for blue from user  

//computes the smallest value

if(red<green && red<blue) //if red value is less than green and blue values  

smallest=red;   //red is the smallest so assign value of red to smallest  

else if(green<blue)   //if green value is less than blue value  

smallest=green;   //green is the smallest so assign value of green to smallest  

else  //this means blue is the smallest  

smallest=blue;  //assign value of blue to smallest  

//removes gray part by subtracting smallest from rgb  

red=red-smallest;  //subtract smallest from red  

green=green-smallest;  //subtract smallest from green  

blue=blue-smallest;  //subtract smallest from blue  

cout<<"red after removing gray part: "<<red<<endl;  //displays amount of red after removing gray  

cout<<"green after removing gray part: "<<green<<endl;  //displays amount of green after removing gray

cout<<"blue after removing gray part: "<<blue<<endl;  } //displays amount of blue after removing gray  

Explanation:

I will explain the program using an example.  

Lets say user enter 130 as value for red, 50 for green and 130 for blue. So

red = 130  

green = 50  

blue = 130  

First if condition if(red<green && red<blue)   checks if value of red is less than green and blue. Since red=130 so this condition evaluate to false and the program moves to the else if part else if(green<blue) which checks if green is less than blue. This condition evaluates to true as green=50 and blue = 130 so green is less than blue. Hence the body of this else if executes which has the statement: smallest=green;  so the smallest it set to green value.  

smallest = 50  

Now the statement: red=red-smallest; becomes:  

red = 130 - 50  

red = 80  

the statement: green=green-smallest;  becomes:  

green = 50 - 50  

green = 0  

the statement: blue=blue-smallest; becomes:  

blue = 130 - 50  

blue = 80  

So the output of the entire program is:  

red after removing gray part: 80                                                                                                 green after removing gray part: 0                                                                                                blue after removing gray part: 80  

The screenshot of the program along with its output is attached.

I Need To Know How To Input This Into Python On Zybooks. I've Been Stuck On This For Days And I Keep

Related Questions

i really need help please im about to give up

Answers

Answer:

true

Explanation:

because I ain't stupid

Choose the best answer to complete the sentence.

A transferable skill can be applied:

in a variety of situations and roles.

in only one setting or situation.

in every situation.​

Answers

Answer:

First is A

Explanation:

Second is B,C,F

the way information from my computer is given back to the user is called​

Answers

Answer:

Add answer???

Explanation:

Which note-taking method quickly captures and organizes information?

mapping
Cornell
SQRW
recording

Answers

Answer:

c mapping

Explanation:

Mapping  is a note-taking method that quickly captures and organizes information

What is mapping method in note-taking?

Mapping is known to be s process where one can make use of their comprehension or concentration skills and then they can use in a note taking form.

In this method, it always linked each fact or idea to all other fact or idea. Mapping is known to be a kind of  graphic representation of the work or all the contents of a lecture.

Learn more about mapping  from

https://brainly.com/question/1425367

In one to two sentences, describe how to create a new tab.

Answers

Answer:

First you could move your cursor to the right and click on the button that looks like this +    

Or you can press ctrl+T and make a new tab

Explanation:

Hope this help you!

Which of the following are examples of packages you can import and use classes from in java?

Choose all options that apply.


A. Main.main

B. java.util

C. java.double

D. java.int

E. edhesive.shapes

Answers

it’s D java. int i think

Introduction:

Java is a computer programming language. A computer programmer may use package in java which is a mechanism to encapsulate a group of classes and then import it to sub package interfaces.

Explanation:

These package help to prevent the issues of naming conflicts. The examples of packages which can import and use classes from in java are

Conclusion:

A. Main.main

B. Java.util

D. java.int

Learn more at https://brainly.com/question/17882992

Select the correct answer.
In what decade did the first computer become commercially available?
A.
1950s
B.
1960s
1970s
thing
D.
1980s
O E.
1990s

Answers

Answer:

1960's

Explanation:

Answer: 1960

Explanation:

Describe in 2-4 sentences how you would select a function on a spreadsheet.

Answers

Answer:

Explanation:

You would call the capacity from the primary. At that point execute your own factors to it. When the capacity is in the cell, you can copy and after that paste it into another cell to do a similar capacity for that diverse scope of cells.

You would call the capacity from the primary. At that point execute your own factors to it. When the capacity is in the cell, you can copy and after that paste it into another cell to do a similar capacity for that diverse scope of cells.

What is spreadsheet?

A spreadsheet is a type of computer program used for organizing, calculating, analyzing, and storing data in tabular form. Spreadsheets were created as digital counterparts to traditional paper accounting spreadsheets.

The data entered into a table's cells is what the program uses to run. Each cell may include text, numeric data, or formula results that automatically calculate and display values based on the contents of neighboring cells.

Users of spreadsheets can change any stored value and watch the changes in calculated values. This enables quick investigation of numerous scenarios without the need for manual recalculation, making the spreadsheet helpful for "what-if" study.

Therefore, You would call the capacity from the primary. At that point execute your own factors to it. When the capacity is in the cell, you can copy and after that paste it into another cell to do a similar capacity for that diverse scope of cells.

To learn more about Spreadsheet, refer to the link:

https://brainly.com/question/8284022

#SPJ3

Someone copied a library video and sold the copies to friends. This is an
example of

Answers

Answer:

Intellectual Property Theft.

Explanation:

Intellectual property theft involves robbing people or companies of their ideas, inventions, and creative expressions—known as “intellectual property”—which can include everything from trade secrets and proprietary products and parts to movies, music, and software.

Answer:

cybercrime

both employees and outsiders

Aimless wandering

A security guard

Many security breaches ........

intellectual property theft

stealing ideas, information, or creative products

add a watermark

embezzling

Which tab is used to configure an export to PST in Outlook 2016?
Send/Receive
File
Home
Review

Answers

Answer:

File Tab

On the topmost ribbon of MS Outlook, go to the File Tab. Click Options>Advanced>Export. From Import and Export wizard, select Export to a file.

The file tab in Outlook 2016 will be used to configure an export to PST. Then, choice B is the best one.

What is outlook?

On your PC, Outlook Desktop App is already installed. You can access it from the Taskbar or the Start menu on your computer (bottom panel of your screen). By logging into your email account using a web browser that you can use Outlook on the web.

By selecting the "Files" icon in Outlook's lower-left corner, you can reach this view. It will be situated between the "People" and "To-Do" icons by default. If you cannot see it but instead have a three-dot icon, click it and then select "Files" from the menu that appears.

The tab used to configure an export to PST in Outlook 2016 will be known as the file tab. Then the correct option is B.

More about the outlook link is given below.

https://brainly.com/question/17457799

#SPJ6

The
is an interest inventory that classifies people according to six different types: Realistic, Investigative, Artistic, Social, Enterprising, and Conventional.


is an aptitude assessment that matches students with study programs at specific colleges and universities.

Answers

Answer:

Campbell Interest Inventory , FOCUS2

Explanation:

Answer:

Campbell Interest Inventory , FOCUS2

Explanation: I took the test and made 100

5
Select the correct answer.
Which method is used to transfer information from one computer to another?
O A.
mass communication
B.
point-to-point communication
C.
internet protocol
D.
hard disk
E.
microprocessor

Answers

Answer:

A

Explanation:

If you wanted to mass communication means it imparts and exchanges information on a scale of people so you couple transfer and share your data from one person to another.

Answer: A

Explanation:

Look both _____before you cross a street and i want to see how much of yall know it

Answers

Answer:

Ways

Explanation:

Look both ways

The collection of tools and features at the top of the screen is called the
O file
O ribbon
O tab

Answers

TAB THE ANSWER IS TAB

(02.05 LC) What is an example of a web browser? Bing Firefox Instagram Yahoo

Answers

Answer: Firefox

Explanation:

Bing and Yahoo are search engines. Instagram is an example of social media. Firefox is a wed browser. A web browser is a window that allows you to open up new tabs. the other three are examples of tabs you can open with Firefox.

Answer:

firefox

Explanation:

Joann now wants to create a building block for the name of her company. She outlines the steps she needs to take to access the Create New Building Block dialog box. What does Joann need to change in her outline? Check all that apply.

Answers

Answer: D. She needs to revise step 4

Explanation: Just took the assignment on edge.

Answer:

D. She needs to revise Step 4

Explanation:

Edge 2020

The ____ logic unit is responsible for the execution of arithmetic and logical operations.

Answers

Answer:

The arithmetic/logic unit(ALU)

Explanation:

This unit executes all arithmetic and logical operations through the electrical circuitry it has.

A student opens a recently purchased software package and begins reading the enclosed materials. What information might be included in the software license? Check all that apply.

Answers

Answer:

1,2,4

Explanation:

plss give me brainliest

Answer:1,3,4

Explanation:just did it

What era did the television occurred in

Answers

Answer:

roughly from the late 1940s through the late 1950s.

Explanation: hope this helps :)

Answer:

The first Golden Age of Television is the era of live television production in the United States, roughly from the late 1940s through the late 1950s.

Explanation:

What are some consequences of posting inappropriate material online? (Choose all that apply)
friends and loved ones might think less of you
you might land in legal trouble
your social media history will be erased from the internet
future employers may not want to hire you.

Answers

Answer:

I think all of them is a consequence of posting inappropriate material online

All except the third one unless it’s something really bad. But otherwise it’s without the third one

The implementation stage of the SDLC _____.


involves describing the desired functionality of the system


involves establishing an overview of the project goals


involves putting the system into production so users can begin to perform real business operations with the system


involves analyzing end-user business requirements in order to refine project goals

Answers

Answer:

d. involves analyzing end-user business requirements in order to refine project goals

Explanation:

In the software development life cycle, the implementation stage is the stage where the computer programmers begin the actual coding of the application required by the end-user. At this stage, the developer takes into account the needs and specifications of the customer.

For example, if the end-user wants a software application that can track payment records, the researcher at this stage begins using the right software to code programs that can effect this function.

In the Page Setup dialog box, the _____ tab gives you options to change the paper size.
a.
Layout
b.
Paper
c.
Sizes
d.
Margins

Answers

Answer:

I think its either layout or sizes

Give me 2 examples of Monthly Cash Inflow: (2 points) *

Answers

Answer:

cash payments for goods and services; merchandise; wages; interest; taxes; supplies and others.

Explanation:

Answer:

1. Key cash flow drivers should be modeled explicitly.

In our example, a retail store business should start with the number of stores it plans to operate each month, then build up from there, based on the number of square feet and sales per square foot.  This will help the business to compute its revenue.

2. Inputs should only need to be input once.

It is important to group all inputs in the assumptions section so users can easily find, add, and modify them.

Explanation:

Myra Wrote a Program and forgot to put the steps in the correct order. Which step does Mya need to Review

A. Pattern Following
B. Planning
C. Segmenting
D. Sequencing

Answers

Answer:

B. Sequencing

Explanation:

I hope this helps you UwU

Answer:

The answer is 'A'

Explanation:

I took the test, and got a 100%

It also makes more sense than the other choices.

Have a good day <3

-
Which of the following is an example of academic integrity?
A. You work on each assignment mostly by yourself
B. You don't copy work or allow others to copy your work
c. You look up answers on the internet without citing the source
D. You work with close friends on assignments without instructor approval

Answers

Answer:

B. You don't copy work or allow others to copy your work

Explanation:

The example of academic integrity is that you don't copy work or allow others to copy your work. The correct option is B.

What is academic integrity?

The moral code or ethical policy of academics is known as academic integrity. The R.C., regarded as the "grandfather of academic integrity," popularised the phrase.

Being honest, fair, polite, and responsible in your studies and academic work is referred to as having academic integrity.

It entails acting in accordance with these ideals both when producing your own work and engaging with that of others.

Academic integrity is the practise of doing learning, teaching, and research with the principles of honesty, trust, fairness, respect, and responsibility.

Students, teachers, researchers, and all other staff members should act honestly, take responsibility for their choices, and be fair in all aspects of their job.

Thus, the correct option is B.

For more details regarding academic integrity, visit:

https://brainly.com/question/9540934

#SPJ2

Which of the following is NOT a characteristic developed by New Journalism?
illustrations and photographs
flashy page layouts
satirical news stories
banner headlines

Answers

Flashy page layouts

The one that is not a characteristic developed by New Journalism is flashy page layouts. The correct option is b.

What are flashy page layouts?

The flashy page Layout describes how the document pages will appear after printing. When we check the layout in Word, we can see that the page layout includes components such as margins, column count, and the ability to alter the header and footer.

There are various sorts of layouts, such as magazine layouts, static, adaptable, dynamic, adaptive layouts, and responsive layouts.

The features are as follows:

Page margin dimensions.Image and figure size and placementColumn and gutter count and size (gaps between columns)Intentional white space placement

Therefore, the correct option is b, flashy page layouts.

To learn more about flashy page layouts, refer to the link:

https://brainly.com/question/28702177

#SPJ2

Create a bash shell script for a number guessing game. Here are the requirements: a. Your program generates a random number between 0 and 128 and keeps asking the user to guess the number until the user guesses it correctly. b. If the user guesses a number that is lower or higher than the number to be guessed then indicate that information to the user as a ‘low guess’ or a ‘high guess’ so that the user can get to the correct guess quicker. c. The program keeps track on number of guesses taken by the user to get to the correct guess. This is user’s score. d. Your program asks user for the name and adds user’s name and the score in a file that keeps track of the scores by various users. e. At the end of the game, the program displays the top 3 scores (lowest 3 scores) along with the name of the users to conclude the game. John 4 Sam 7 Tony 10

Answers

Answer:

Here is the bash shell script:

scorefile="scores_bash"

guess=-1

typeset -i n=0

echo -e "guess.bash - Guess a number between 0 to 128\n"

(( answer = RANDOM % 128 + 0 ))

while (( guess != answer )); do

n=n+1

read -p "Enter guess $n: " guess

if (( guess < answer )); then

 echo "Low guesss"

elif (( guess > answer )); then

 echo "High guess"

fi

done

echo -e "You guessed the number in $n guesses.\n"

read -p "Enter your name: " name

echo $n $name >> $scorefile

echo -e "\nScores"  

sort -n $scorefile

Explanation:

The program creates a scorefile as scores_bash to store the names and scores. Next the program initializes the guess with -1. guess is used to store the guess made by user and n is used to store the number of trials user took to guess the correct number. Next the program prompts the user to: Guess a number between 0 to 128 and generates random numbers from 0 to 128 and store it into answer.  Next the while loop keeps repeating until the user guesses the correct number. If the user guess is less than the correct answer then the program displays the message Low guess otherwise displays High guess. When the user guesses the correct number, the loop breaks and the message You guessed the number in $n guesses. is displayed where in place of $n the number of trials user take to guess the number is displayed. Next the user is asked to enter his name.

echo $n $name >> $scorefile statement adds the n which is the user score and name which is the names of user to the score file.  sort -n $scorefile  sorts the file in ascending order to display the lowest  scores. The screenshot of program with its output is attached.

Magsulat ng ilang mga paalala sa paggawa ng proyektong Series Circuit
1._______________________________________________

2.______________________________________________

3.______________________________________________

4.______________________________________________

5.______________________________________________

PLEASE HELP ME​

Answers

Answer:

mag ingat,dapat d basa ang kamay,ayusin ang posive at negative na hindi maghalo,kong may electric tape mas safe..

Explanation:

yun yung tips ko kasi nakagawa na kami non ay yop 1 yung samin

Can a syntax error occur in a block-based code? Why or why not?

Answers

The environment stops two instructions from snapping together if they cannot be combined to form a valid assertion. Via preventing syntax problems in this way, block-based programming environments maintain the practice of writing programs by piecemeal assembly of statements.

Why do syntax errors happen?

When a programmer enters an incorrect line of code, they have made a syntax error. Missing punctuation or misspelled names are the two most common syntax mistakes. In either a compiled or an interpreted programming language, a syntax error prevents the code from running.

The source code contains a syntax error, but the object code does not. A source program is created by a programmer using a word processor or editor and written in high level language.

To learn more about Syntax error refer to:

https://brainly.com/question/24822807

#SPJ1

What are the two reasons we analyze algorithms?

Answers

Answer:

the most straightforward reason for analyzing an algorithm is too discover its characteristics in order to evaluate its suitability for various applications or compare it with other algorithms for the same application

Other Questions
Can someone help me plz Which of the following is NOT a unique property of water?A.Surface tensionB.It's a powerful solventC.Ice is less dense than waterD.It only exists in liquid and solid form match each clock with its written time:1.son las ocho y media 2.son las cinco y diez3.es la una y media 4.son las once menos cuarto Only had 29% of the nation's populationOnly produced 10% of the nation's manufactured goodsOnly had 29% of the nation's railroad mileageThese factors proved to be a major economic disadvantage for the ___ in the years leading up to the Civil War.A) North B) South C) Border States D) Western territories What do the Plains and Gulf Coast cultures have in common?A. They hunted buffalb as their main source of foodB. They both migratedC. They were fishermen and farmersD. They were sedentaryPlease help Hi plz help its argent its for Spanish I need help What do you think Ngotho thinks about Mr. Howlands? Does he like him? Respect him? Hate him? How is the amount of precipitation in East Texas different from the amount in West Texas? Paid soldier were called A.ronin B.samurai C.diamyos Which article would most likely use a sequence text structure?HELP QUICK PLZ"A Week in Mainland China""Ten Reasons to Visit Miami""Which Island Is Right for You?""Our Top Ten Restaurant Picks" Bromine, a liquid at room temperature, has a boiling point of 58C and a melting point of 7.2C. Bromine can be classified as acompound.impure substance.mixture.pure substance. how many centimeters are in 4.8 inches?[1 inch = 2.5 cm]a. 12 cmb. 11 cmc. 7.30 cmd. 1.92 cm Expressions with tener In Spanish provide the Spanish translation for the following expressions with tener' . 1. How old are you? 2. Are you thirsty? 3. We are in a hurry. 4. Is Luis cold? Many states run lotteries to raise money. A website advertises that it knows "how to increase YOUR chances of Winning the Lottery." They offer several systems and criticize others as foolish. One system is called Lucky Numbers. People who play the Lucky Numbers system just pick a "lucky" number to play, but maybe some numbers are luckier than others. Let's use a simulation to see how well this system works. To make the situation manageable, simulate a simple lottery in which a single digit from 00 to 99 is selected as the winning number. Any value can be picked, but for this exercise, pick 1 as the lucky number. What proportion of the time do you win Convert the following to Celsius16) 100K17) 200K18) 273K19) 350K When your blood pressure is low, choose a choice below that explains what occurs.A. The nervous system signals smooth muscles in the blood vessels to relax to decrease blood pressure.B. The nervous signals smooth muscles in the blood vessels to relax to increase blood pressure.C. The nervous system signals smooth muscles to contract to decrease blood pressure.D. The nervous system signals smooth muscles in the blood vessels to contract to increase blood pressure Marisa said that multiplying 8.0 by 1,000,000 would increase the value of the 8 because there would be 6 more zeros after the decimal point. explain what is wrong in marisa's statement By repeating the phrase "You don't know," Suzukicreatesa peaceful tone.a helpful tone.a forceful tone.a hopeful tone. Imagine a glucose molecule entering the cell membrane. Would thatmolecule be able to reach the mitochondria faster if the cell had a smallervolume or a larger volume? Explain. So i'm having difficulty understanding this "When multiplying the same base raised to an exponent __ the base and __ the exponents" Please help i do not understand this.