If you had to make a choice between studies and games during a holiday, you would use the _______ control structure. If you had to fill in your name and address on ten assignment books, you would use the ______ control structure.



The answers for the blanks are Selection and looping. Saw that this hasn't been answered before and so just wanted to share.

Answers

Answer 1

The missing words are "if-else" and "looping".

What is the completed sentence?

If you had to make a choice between studies and games during a holiday, you would use the if-else control structure. If you had to fill in your name and address on ten assignment books, you would use the looping control structure.

A loop is a set of instructions in computer programming that is repeatedly repeated until a given condition is met. Typically, a process is performed, such as retrieving and modifying data, and then a condition is verified, such as whether a counter has reached a predetermined number.

Learn more about looping:
https://brainly.com/question/30706582
#SPJ1


Related Questions

plsssssss heeeeeelp


Step 1: Create a New LocoXtreme Python Program


Start by creating a new Python program in the LocoRobo Academy.


The logic we will add will occur between the activate and deactivate motor lines. Recall that the motors must be activated in order to properly set the RGB Lights.


W1. Add code to prompt the user three times. Once for each R, G, and B color value, with the output stored in variables R, G, and B respectively. However, each prompt should ask for a HEX value from 00 to FF. Write your code below.

Step 2: Using the Input

With the input hex values stored in variables, we need to convert the values to decimal for use with the LocoXtreme set_lights() command. Recall that the int() function with a base of 16 can convert a hexadecimal string into a decimal integer.

W2. Add code to convert each R, G, B value into decimal, storing the decimal value in the same respective R, G, and B variable. Write your code below.

Now that we have decimal values, we can pass them to the set_lights() command and pause to display the user-specified color.

W3. Call set_lights() using your three decimal color values. Include a sync_lights() call after to update the lights on the robot. Finally, add a time.sleep() call to make the lights display for a time before the robot disconnects.

Step 3. Slicing

In the Lesson Video and Student Guide, it was shown how a string of hex characters could be split using slicing. Rather than prompting the user for three separate hexadecimal color values, we can prompt them for a single string of all three sets concatenated together. For example, rather than a user inputting FF three times, they would input FFFFFF in a single prompt.

For this type of logic, it is assumed the length is always 6 characters. Therefore, the user needs to add a leading '0' if the value would otherwise be a single digit. For example, 'A' would be '0A'.

W4. Update your code to only prompt the user for a single 6-character hexadecimal string. Slice the values for R, G, and B from left to right in the string, before they are cast into decimals. Write your updated code section below.

Answers

The Program based on the information will be given below.

How to explain the program

# Prompt the user to input a 6-character hexadecimal string

inputs = input("Please enter a six-digit hexadecimal sequence (e.g. FFFFFF): ")

# Slice the R, G and B values separately from left to right in the string, adding a leading '0' if needed

R_value = int(inputs[0:2], 16)

G_value = int(inputs[2:4], 16)

B_value = int(inputs[4:6], 16)

# Call set_lights() with three decimal represented colors then sync_lights()

set_lights(R_value, G_value, B_value)

sync_lights()

# To make lights display longer before disconnecting, add a time delay  

time.sleep(5)

Learn more about program on

https://brainly.com/question/26642771

#SPJ1

Shady lady Mortgage Company requires an insurance down payment on all its mortgages based on the
following schedule:
5% on the first $25,000
3% on the remaining balance Develop the logic required for a program to computer the down payment requires by the mortgagee and list the mortgagee's account number and name. The input data record will contain name, account number,
and mortgage amount. Use functions. Add comments and use the output formatting for the
currency.

Answers

An Illustrative Depiction and Programming Sample in Python:

The Python description

Define a function to compute the premium for an insurance down payment related to the sum of one's mortgage.

In this part,

a. Create an intial value of 0.

b. Should the amount obtained be less than or equal to $25,000, then calculate 5% of the mortgage as the down payment.

c. Conversely, should the mortgage be more than $25,000, use the formula provided -- 5% of $25,000 and an additional 3% on any additional funds over the set amount --for down payments.  

Now, within the main function:

a. Procure all required data so as to enter each user’s name, account number, and procedure for mortgaging funds for measurement in said equation.

b. Thereafter contact the aforementioned calculator of the insurance down payment, being sure to provide it with the sum of the mortgage as input, from which it will generate the final sum required for that particular premium.

c. Last, format the output displayed for the customer in currency mode—listing their account number, given name, and accurate representation of the needed down payment.

Read more about mortgage here:

https://brainly.com/question/1318711

#SPJ1

Other Questions
________________________ is evidenced when infants use the caregiver, usually the mother, as a secure base from which to explore the environment. When the codes hidden inside our genes come out to light as physical traits, we call it _____:A. translation.B. transcription.C. replicationD. gene expression. A local university contracted with IBM to implement a new database system, which the university would then administer and run. This is an example of what type of outsourcing What was the main problem that the basketball player (Clay) faced shooting free throws in the scenario presented at the beginning of the chapter A construction company completes two projects. The first project has $3,000 in labor expenses for 60 hours worked, while the second project has $2,100 in labor expenses for 42 hours worked. The relationship between the companys labor expenses and hours worked is linear. Which of the following would correctly calculate the y-intercept of the linear equation? Select all that apply. 3,000 = 50(60) + b 3,000 = 0.02(60) + b 60 = 50(3,000) + b 2,100 = 0.02(42) + b 2,100 = 50(42) + b 42 = 50(2,100) + b the ____________ instruction will move execution to a different section of code regardless of any conditions. Your apartment building burned down while you were on vacation. Fortunately, you have renter's insurance. What will your policy cover? d. When we have red-black trees and AVL trees that can perform most of operations in logarithmic times, then what is the need for splay trees? Chymotrypsin is a pancreatic digestive enzyme that is inactive until it is secreted into the intestines, where it is hydrolyzed by the protease Trypsin. One of the fragments that results from this hydrolysis is the active form. This form of enzyme regulation is: Kramerica Inc. sold 350 oil drums to Thompson Manufacturing for $75 each. In addition to the $75 sale price per drum, there is a $1 per drum federal excise tax and a 7% state sales tax. What journal entry should be made to record this sale In the late 1800s and early 1900s, labor unions in Texas and elsewhere in the United States worked to By guaranteeing that all participants in its dance classes will be able to do the foxtrot by the end of their first lesson or their money will be refunded, the Fred Astaire Dance Studio is: The frictional unemployment rate is 2.5 percent, the structural unemployment rate is 3.1 percent, and the economy's current unemployment rate is 5.6 percent. The economy is in The federal government, including Medicare and Medicaid programs, has taken measures to ensure hospitals control transmission of A police officer came to the door of a suspect's house and showed his badge, provided his name, and stated his purpose. What is this an example of Evaluate the methods of obtaining privilege escalation on mobile devices and conclude which is an example of jailbreaking. Carbon ink, made by mixing soot with water and gum, has been used in Asia since around 2500 BCE. The contemporary version of carbon inkis called(A) Gall inkB BisterCIndia inkD) Sepia Steve is a US citizen who is currently working in the United Kingdom. In the official international trade accounts, he is considered a________________. Warren Buffet, the billionaire CEO of the Berkshire Hathaway Corporation, has brought attention to the fact that he is taxed at a lower rate than his secretary, who pays almost 30 percent of her income in federal income taxes each year. Mr. Buffet is taxed at a lower rate because _________. Question 10 options: his salary is diverted into Roth IRA accounts, which are not taxed until the money is dispersed he has diverted 30 percent of his salary into U.S. Treasury bonds and those are taxed at a lower rate than salaries he has diverted 30 percent of his salary into pretax investment funds, which are not taxed until the money is dispersed his income comes from dividends, which are taxed at 15 percent he is older than his secretary and current tax rates are based on income as well as on age McCall and Teresa enter into a contract for the distribution of McCall's produce to local restaurants for which Teresa agrees to pay. McCall transfers his right to payment under the contract to Midtown Bank. This transfer is