What is an example of a condition controlled loop? What would the syntax look like?

Answers

Answer 1

Answer:

The answer to this question is given below in the explanation section.

Explanation:

WHILE loops and DO WHILE loops are called the condition controlled loops. The execution of these loops depends on a certain condition, when the condition is true, the loop body will be executed and when the condition becomes false, the loop body will not be executed. the major difference between both loops is given below.

In the WHILE loop,  the condition is checked at the beginning of the loop whereas in the do-while loop condition is checked at the end of the loop and, in the do-while loop, the loop body is executed at least once.

The syntax of the while loop is given below

while (condition) {

 // code block to be executed

}

The syntax of do-while loop is given below

do {

 // code block to be executed

}

while (condition);


Related Questions

A _____ is a smaller image of a slide.

template
toolbar
thumbnail
pane

Answers

I believe it is pane since a thumbnail is like a main photo or advertising photo kind of thing and template has nothing to do with a image as well as toolbar so the answer would be pane hope that helps :)

What is the proper syntax for writing a while loop in Python?

A. Begin the statement with the keyword repeat
B. End the statement with a colon
C. Place the test condition outside of parentheses
D. Use quotation marks around the relational operators

Answers

The proper syntax for while loops in Python are:

while (condition):

   #the code does something

Answer choice B is the only correct option because all while loops end with a colon.

Answer:

End the statement with a colon

Explanation:

I took the test and got it right.

The author Darnell Littal belleves that "Beyond bad markets and economic news, the number one reason that mergers
fall is the absence of a well-understood

Answers

Answer:

human performance plan

Explanation:

(for odyssey users)

Using the Multiple-Alternative IFTHENELSE Control structure write the pseudocode to solve the following problem to prepare a contract labor report for heavy equipment operators: The input will contain the employee name, job performed, hours worked per day, and a code. Journeyman employees have a code of J, apprentices a code of A, and casual labor a code of C. The output consists of the employee name, job performed, hours worked, and calculated pay. Journeyman employees receive $20.00 per hour. Apprentices receive $15.00 per hour. Casual Labor receives $10.00 per hour.

Answers

Answer:

The pseudo-code to this question can be defined as follows:

Explanation:

START //start process

//set all the given value  

SET Pay to 0 //use pay variable that sets a value 0

SET Journeyman_Pay_Rate  to 20//use Journeyman_Pay_Rate variable to sets the value 20

SET Apprentices_Pay_Rate to 15//use Apprentices_Pay_Rate variable to sets the value 15  

SET Casual_Pay_Rate to 10//use Casual_Pay_Rate variable to set the value 10

READ name//input value

READ job//input value

READ hours//input value

READ code//input value

IF code is 'J' THEN//use if to check code is 'j'  

  COMPUTE pay AS hours * JOURNEYMAN_PAY_RATE//calculate the value

IF code is 'A' THEN//use if to check code is 'A'

  COMPUTE pay AS hours * APPRENTICES_PAY_RATE//calculate the value

IF code is 'C' THEN//use if to check code is 'C'

  COMPUTE pay AS hours * CASUAL_PAY_RATE//calculate the value

END//end conditions

PRINT name//print value

PRINT job//print value

PRINT code//print value

PRINT Pay//print value

END//end process

Which orientation is wider than it is tall?

Portrait
Macro
Shutter
Landscape

Answers

Answer:

Landscape

Explanation:

Landscape orientation is wider than it is tall.

Answer:

Landscape

Explanation:

Main topics: Basic Java program
Programmatic output
Arithmetic Expressions
User input
Program Specification:
Write a Java program that calculates and outputs a baseball pitcher’s ERA in a reasonable report format. "ERA" is an acronym for "earned run average" and is computed using the following equation: number of earned runs multiplied by 9 and divided by number of innings pitched Your program must do the following: • Prompt the user for the first and last name of the pitcher and store them in two variables of type String • Prompt the user for the pitcher’s number of earned runs and store it in a variable of type int • Prompt the user for the pitcher’s number of innings pitched and store it in a variable of type int • Compute and output the pitcher’s ERA, which should be a (double) floating point number Sample run(s): Pitcher’s first name: Josh Pitcher’s last name: Hader Number of earned runs: 22 Number of innings pitched: 81 Josh Hader has an ERA of 2.4444444444444446

Answers

Answer:

Explanation:

import java.util.Scanner;

public class pitcherValues {

   public static void main(String[] args) {

       String firstName, lastName;

       int earnedRuns, inningsPitched;

       double ERA;

      Scanner in = new Scanner(System.in);

     System.out.println("Pitchers First Name is?");

     firstName = in.nextLine();

     System.out.println("Pitchers Last Name is?");

     lastName = in.nextLine();

     System.out.println("How many runs did the Pitcher earn?");

     earnedRuns = in.nextInt();

     System.out.println("How many innings did the Pitcher Pitch?");

     inningsPitched = in.nextInt();

     ERA = (earnedRuns * 9) / inningsPitched;

     System.out.println(firstName + " " + lastName + " has an ERA of " + ERA);

   }

}

Adjust list by normalizing When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by subtracting the smallest value from all the values. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain fewer than 20 integers. Ex: If the input is: 5 30 50 10 70 65 the output is: 20 40 0 60 55 The 5 indicates that there are five values in the list, namely 30, 50, 10, 70, and 65. 10 is the smallest value in the list, so is subtracted from each value in the list. For coding simplicity, follow every output value by a space, including the last one.

Answers

Answer:

Written in Python

inp = int(input("Length: "))

num = []

num.append(inp)

for i in range(1,inp+1):

    userinp = int(input("Input: "))

    num.append(userinp)

smallest = num[1]

for i in range(1,len(num)):

    if smallest > num[i]:

         smallest = num[i]

for i in range(1,len(num)):

    num[i] = num[i] - smallest

for i in range(1,len(num)):

    print(num[i],end=' ')

Explanation:

I've added the full program as an attachment where I used comments as explanation

Which of the following is NOT an example of input?

a
voice command
b
mouse clicks
c
keyboard strokes
d
a pop-up box

Answers

Answer:

a pop-up box

Explanation:

A voice command, mouse clicks, or keyboard strokes is the user doing something. But a pop-up box is not. I realize that a popup box could contain a user input, but the box itself is not any sort of user input. It's the opposite.

My Mac is stuck on this screen? How to fix?

Answers

Answer:

Press and hold the power button for up to 10 seconds, until your Mac turns off. If that doesn't work, try using a cellular device to contact Apple Support.

Explanation:

If that also doesn't work try click the following keys altogether:

(press Command-Control-Eject on your keyboard)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This makes the laptop (macOS) instruct to restart immediately.

Hopefully this helps! If you need any additional help, feel free and don't hesitate to comment here or private message me!. Have a nice day/night! :))))

Another Tip:

(Press the shift, control, and option keys at the same time. While you are pressing those keys, also hold the power button along with that.)

(For at least 10 seconds)

Write a program which simulate rolling dice. When the program runs, it will prompt the user to choose a number ranging from 1 to 6. It will then randomly choose a number between 1 and 6. The program will print the message "Your guess is correct!" if the guess number equals to the dice number, otherwise it will print "Wow! The dice number is --.". It should then ask the user if you’d like to roll again. Enter "1" to roll again and enter "0" to end the game. Concepts to keep in mind:

Concepts to keep in mind:
• Random
• Integer
• Print
• While Loops

Output:
Enter your guess number between 1 and 6: 5
Wow! The dice number is 1
Do you want to dice it up again:Enter 1 and if not enter 01
Enter your guess number between 1 and 6: 4
Wow! The dice number is 1
Do you want to dice it up again:Enter 1 and if not enter 01

Answers

Answer:

Written in Python

import random

tryagain = 1

while tryagain == 1:

guess = int(input("Enter your guess number between 1 and 6: "))

num = random.randint(1,7)

if guess == num:

print("Your guess is correct")

else:

print("Wow, the dice number is "+str(num))

tryagain = int(input("Do you want to dice it up again:Enter 1 and if not enter 0: "))

Explanation:

I've added the full source code as an image attachment where I used comments to explain difficult lines

Which of the following is a feature of high-level code?
Language makes it easier to detect problems
Requires a lot of experience
Easy for a computer to understand
Runs quicker

Answers

Runs quicker because High-level programming showcases features like generic data structures and operations, run faster, and intermediate code files which are most likely to result in higher memory consumption, and larger binary program size hope that helps :)

Why the shape of a cell is hexagonal

Answers

Answer:

Hexagonal cell shape is perfect over square or triangular cell shapes in cellular architecture because it cover an entire area without overlapping i.e. they can cover the entire geographical region without any gaps.

I hope this helps

Pls mark as brainliest

Hexagonal shapes are preferred over squares, or circles because it covers an entire area without overlapping. It requires fewer cells.

What is his resolution amount

Answers

I think it’s 92 I mean yh

Which categories format cells? Check all that apply. currency percentage data month date text

Answers

Answer:

currency

percentage

date

text

Explanation:

The category of format cells are currency, percentage, data, month, date, and text. The all options are correct.

What is Format Cells dialog box?

In the Format Cells dialog box, you can configure the formatting options for your report objects.

For a row or column header and the values, you can format the number, font, alignment, border, and pattern.

The format cells command in Excel is used to change the formatting of cell numbers without changing the actual number.

We can change the number, alignment, font style, border style, fill options, and protection using the format cells. We can get to this option by right-clicking the mouse.

Currency, percentage, data, month, date, and text are examples of format cells.

Thus, all options are correct.

For more details regarding format cell, visit:

https://brainly.com/question/24139670

#SPJ2

thank you very much for your email. ...... was very interesting​

Answers

Answer:

WHAT DO YOU MEAN

Explanation:

THIS IS FOR QUESTIONS ONLY !!!!

sum_even Write a program that reads an integer 0 < n < 2^32, returns the sum of all digits in n that are divisible by 2. For example, if n = 341238 the output would be 14, because it is the sum of 4 + 2 + 8. Hint: a signed int may not be enough.

Answers

Answer:

Written in Python

n = int(input("Num: "))

sum_even = 0

if n > 0 and n < 2**32:

     strn = str(n)

     for i in range(0,len(strn)):

           if int(strn[i])%2 == 0:

                 sum_even = sum_even+ int(strn[i])

print(sum_even)

Explanation:

This line prompt user for input

n = int(input("Num: "))

This line initializes sum_even to 0

sum_even = 0

This line checks for valid input

if n > 0 and n < 2**32:

This line converts input to string

     strn = str(n)

This line iterates through each digit of the input

     for i in range(0,len(strn)):

This if condition checks for even number

           if int(strn[i])%2 == 0:

This adds the even numbers

                 sum_even = sum_even+ int(strn[i])

This prints the sum of all even number in the user input

print(sum_even)

explain how to use the information in an outline to start writing a business document

Answers

Answer: document

Explanation:

maybe try to think of an impressive title that’ll catch the readers attention or reveal the purpose of your writing in ur first paragraph of the main body

(1) Prompt the user to enter a string of their choosing. Output the string.
Ex: Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only thing we have to fear is fear itself.
(2) Complete the GetNumOfCharacters() function, which returns the number of characters in the user's string. Use a for loop in this function for practice. (2 pts)
(3) In main(), call the GetNumOfCharacters() function and then output the returned result. (1 pt) (4) Implement the OutputWithoutWhitespace() function. OutputWithoutWhitespace() outputs the string's characters except for whitespace (spaces, tabs). Note: A tab is '\t'. Call the OutputWithoutWhitespace() function in main(). (2 pts)
Ex: Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only thing we have to fear is fear itself. Number of characters: 46 String with no whitespace: The only thing we have to fear is fear itself.

Answers

Answer:

The solution is given in the explanation section

See comments for detailed explanation of each step

Explanation:

import java.util.Scanner;

class Main {

 public static void main(String[] args) {

   //Prompting the User to enter a String

   System.out.println("Enter a sentence or phrase: ");

   //Receiving the string entered with the Scanner Object

   Scanner in = new Scanner (System.in);

   String user_word = in.nextLine();

   //OutPuting User entered string

   System.out.println("You entered: "+user_word);

   //Calling the GetNumOfCharacters Method

   System.out.println("Number of characters: "+ GetNumOfCharacters(user_word));

   //Calling the OutputWithoutWhitespace Mehtod

   System.out.println("String with no whitespace: "+OutputWithoutWhitespace(user_word));

   }

   //Creating the function GetNumOfCharacters()

   //This function will return the number of characters

 // in the string entered by the user_word

 public static int GetNumOfCharacters (String word) {

   int noOfCharacters = 0;

   for(int i = 0; i< word.length(); i++){

     noOfCharacters++;

   }

   return noOfCharacters;

 }

 //Creating the OutputWithoutWhitespace() method

 //This method will remove all tabs and spaces from the original string

 public static String OutputWithoutWhitespace(String word){

   //Use the replaceAll all method of strings to replace all whitespaces with no space.

   String new_string = word.replaceAll(" ","");

   return new_string;

 }

}

Which is an example of an operating system

a
Adobe Photoshop

b
Internet Explorer

c
Windows

d
Microsoft Word

Answers

Answer:

windows

Explanation:

Examples of Operating Systems

Some examples include versions of Microsoft Windows (like Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP), Apple's macOS (formerly OS X), Chrome OS, BlackBerry Tablet OS, and flavors of Linux, an open-source operating system.

Is the flow of power reversible in a cam and follower

Answers

Answer:

No

Explanation:

The Cam and Follower's input movement is rotary, and it's output movement is reciprocating. ... The Cam and Follower's flow of power is not reversible, but it's direction of travel is reversible. Cam and Followers can be found in cam shafts.

1 megabyte is equal to 1024 gigabyte. True/False​

Answers

Answer:

false

Explanation:

1 MB = 0.001 GB

In __________ write, the data are stored in the cache, and control returns to the caller. Select one: a. a synchronous b. a buffered c. an asynchronous d. a non-buffered

Answers

Answer:

The correct answer to the question is option C (an asynchronous)

Explanation:

Computer store files in its temporary data storage space so as to facilitate easy retrievals when needed. Cache memory is in the temporary data storage space of the computer, faster than any other system memory so that when the processor requests information from the computer memory after a user place a command, the cache memory makes the information available in a short time when the data are required eliminating delay when ram will have to take time to fetch the data to provide to the processor.

In an asynchronous write, the data are stored in the cache to enable easy retrieval by the computer processor just as the cache is explained above, it allows writing data to the cluster. Asynchronous write also allows control returns to the caller.

Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMiles. Sample output for the given program:
Min miles: -10
Max miles: 40
Here's what I have so far:
import java.util.Scanner;
public class ArraysKeyValue {
public static void main (String [] args) {
final int NUM_ROWS = 2;
final int NUM_COLS = 2;
int [][] milesTracker = new int[NUM_ROWS][NUM_COLS];
int i = 0;
int j = 0;
int maxMiles = 0; // Assign with first element in milesTracker before loop
int minMiles = 0; // Assign with first element in milesTracker before loop
milesTracker[0][0] = -10;
milesTracker[0][1] = 20;
milesTracker[1][0] = 30;
milesTracker[1][1] = 40;
//edit from here
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] > maxMiles){
maxMiles = milesTracker[i][j];
}
}
}
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] < minMiles){
minMiles = milesTracker[i][j];
}
}
}
//edit to here
System.out.println("Min miles: " + minMiles);
System.out.println("Max miles: " + maxMiles);
}

Answers

Answer: 40, 4

Explanation:

The __________ list is intended to facilitate the development of the leading free network exploration tool.

Answers

Answer:

Nmap development list

Explanation:

The list being mentioned in this question is known as the Nmap development list. This list basically acts as an information gathering and analytical tool. It allows the user to easily roll out and integrate Nmap tools on a network in order to easily detect all of the IP addresses that are connected as well as analyze all of the details regarding each connected individual system. All of this information is highly valuable to a developer and facilitates the development process.

This is Java! Help is appreciated :)

Answers

public class TvShow {

   int x;

   public TvShow(String showName, int numMinutes){

   }

   public int getNumActors(String actors){

       //method code goes here but since it's just a signature we don't put anything here.

       return 0;

   }

   TvShow show22 = new TvShow("Leave it to Beaver", x);

   public double cost(int i){

       return 0;

   }

   public static void main(String[] args) {

   }

   

}

class Tester {

   public static void main(String[] args) {

       TvShow tv = new TvShow("", 0);

       tv.show22.cost(0);

   }

   

}

I hope this helps in some way!

Read the following code:


n = 3

while(n <= 5):

print(n)

n = n + 1


What output would be produced for the given values of n?


A. 0 1 2 3 4

B. 1 2 3 4 5

C. 2 3 4

D. 3 4 5

Answers

The code will print out 3 4 5

Answer choice D is correct.

The output that would be produced for the given values of n is 3 4 5. The correct option is D.

What are codes?

Codes Program is a free developer platform where programmers can learn and share their knowledge. It is regarded as the simplest application development method, and it is frequently used as the standard (method).

Fixing code well into the software program because they discovered an error while composing the program, then he will modify the program, and then they will fix it again.

Less formally, code refers to text written for markup or styling languages such as HTML and CSS (Cascading Style Sheets). Good code is written in such a way that it is readable, understandable, covered by automated tests, not overly complicated, and does the job well."

Therefore, the correct option is D. 3 4 5.

To learn more about codes, refer to the below link:

https://brainly.com/question/14461424

#SPJ2

A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output is the miles walked. If the input is 5345, the output is 2.6725.

Answers

In python:

print(steps_walked / 2000)

21. Duplicating a layer merges all of the layers and discards anything that is
not visible. True or False
True
False

Answers

the answer is false. Because it just makes a copy, including all parts of the program.
The answer is false

1. When you write HTML code, you use ______ to describe the structure of information on a webpage. a. a web address b. tags c. styles d. links

Answers

Answer:

b. tags

Explanation:

When you write HTML code, you use tags to describe the structure of information on a webpage. These tags are represented by the following symbols <>. All of HTML is written using different types of tags such as <body>, <main>, <div>, <nav>, etc. Each of these serves a different purpose but are all used for structuring the specific information on a website so that the information is well organized and is not all on top of each other. This also allows for specific sections to be easily targeted and styles separately from the other sections.

802.11ac provides an advantage over 802.11n by incorporating increased channel bonding capabilities. What size bonded channels does 802.11ac support?

Answers

Answer:

The 802.11ac wireless standard takes channel bonding to a higher level because it can support 20MHz, 40MHz, and 80MHz channels, with an optional use of 160MHz channels.

Explanation:

The 802.11ac is a standardized wireless protocol established and accepted by the institute of electrical and electronics engineers (IEEE). 802.11ac as a wireless local area network (WLAN) protocol, has multiple amplitude and bandwidth, thus making it to be the first standard wireless protocol to have the ability to operate on a Gigabit (Gb) network.

Generally, the 802.11ac wireless standard provides an advantage over 802.11n by incorporating increased channel bonding capabilities. The 802.11ac wireless standard takes channel bonding to a higher level because it can support 20MHz, 40MHz, and 80MHz channels, with an optional use of 160MHz channels.

On the other hand, 802.11n is a standardized wireless protocol that can support either a 20MHz or 40MHz channel.

Other Questions
A collar maker earns $0.27 per collar. If he sews 55 collars,then how much will he earn? Will give brainliest to best answer TIMED!Read this passage from the farewell address George Washington wrote at the end of his presidency.The alternate domination of one faction over another, sharpened by the spirit of revenge, natural to party dissension, which in different ages and countries has perpetrated the most horrid enormities, is itself a frightful despotism.Farewell address,George Washington,1796Which statement best explains Washingtons stance in this passage?Having different factions can help to address the needs of constituents.Creating divisions within political systems is more harmful than helpful.It is important to establish bonds with foreign nations for future relations.Establishing political parties can help to prevent the rise of despotism. Select the correct answer.Jason is traveling by car from his home to his office. He has gone 3.5 miles so far. From this point on, he can cover 100 miles every 2 hours. What is the equation of a line that models the total miles traveled, y, in x hours after this point?A. y = 100x + 3.5B. y = 100x 3.5C. y = 50x + 3.5D. y = -50x + 3.5 Who was Margaret fuller 1An atom of element Q contains 19 electrons, 19 protons and 20 neutrons.What is Q?A calciumB potassiumstrontiumDyttrium Water level in a well was 20m below ground level. During rainy season, rainwater collected in different water tanks was drained into the well and the water level rise 5 m above the previous level. The wall of the well is 1m 20cm high and a pulley affixed at a height of 80 cm. Raghu wants to draw water from the well. Find the minimum length of the rope that he can use. Seven cards are selected from a standard deck of cards. a) Determine the probability that exactly 5 of them are hearts. b) Determine the probability that there are 3 hearts and 3 diamonds. c) Determine the probability that there are 3 hearts, 3 diamonds and 1 spade. d) Determine the probability that there are 2 Aces and 2 Kings. e) Determine the probability that there are 2 Aces and 3 Kings. All good experiments should be... Robert is moving and must rent a truck. In addition to an initial fee, the rental company charges a fee of $1.50 per mile driven. If Robert were to drive 4 miles, the total cost would be $26. Write an equation for C,C, in terms of m,m, representing the total cost of renting the truck if Robert were to drive mm miles. Does anybody play Among Us? Please helppppo thanksss!!! you are selling tickets to a school play. students tickets cost 5.00 dollars and adults tickets cost 7.00. you sell a total of 125 tickets and collect 775.00 dollars. how many of each type of ticket did you sell? PLZ HELP SHOW WORK What is the constant of proportionality of the linear function? How do businesses determine the equilibrium price of a good or service?A. They set a price that matches the expenses they take on to createsupply.B. They set a price where the demand is less than the quantity theare willing to supply.C. They set a price where the demand matches the quantity they arewilling to supplyD. They set a price where the demand exceeds the quantity they arewilling to supply. A key difference between plants and animals is the method by which glucose is obtained to be converted to ATP. By what process do most plants obtain glucose for energy?A. PhotosynthesisB. Ingestion of organic materialC. Aerobic cellular respirationD. Anaerobic cellular respiration Estimate and then solve the equation.x 1745 = 1315The estimated equation is .The estimated solution is x = .The actual solution is x = . Im timed helpHow did the Crusades change trade in Europe?They increased demand for European products in the Holy Land.They brought traders who took business from European merchants.They created demand for luxury items brought back by the soldiers,They were expensive, so there was less money to use for trade. Which country in Africa has the following characteristics?i. It has an emerging market economy.ii. It is the wealthiest country in Africa.iii. It has a history of racial segregation.A.LibyaB.EgyptC.South AfricaD.Nigeria f/5n3+h=g (Solve the following equation for F)