Which of the following clauses will stop the loop when the value in the intPopulation variable is less than the number 5000? a. Do While intPopulation >= 5000 b. Do Until intPopulation < 5000 c. Loop While intPopulation >= 5000 d. All of the above.
Q: 1) Button1 ask user to enter grades and record in listbox1. 2) Button2 to give the (5) statistic…
A: The Answer is
Q: Please answer the question below 13. Choose correct option A button’s _______ event is used to…
A: Question 13. A button’s _______ event is used to run code. OnClick onclick Click click
Q: The Case Other clause must be the last clause in a Select Case statement.a. True b. False
A: The Select Case structure contains Case Else clause, and it must be the last clause in the list of…
Q: Q2/ Draw the flowchart required to determine whether a student passed or not (NOTE: the student have…
A:
Q: The strDue variable contains the string “$****75”. Which of the following statements removes the…
A: TrimStart(): It is a method that is used to remove the occurrences of set of characters that is…
Q: Write a Handles clause that associates a procedure with the TextChanged events for the txtFirst and…
A: The presence of a “Handles” clause indicates the object and associates a procedure with an event of…
Q: An else clause always goes with .1. the closest previous if clause that doesn’t already have its own…
A: Given: An else clause always goes with .1. the closest previous if clause that doesn’t already have…
Q: For the code below can you varify the card number, card exp date, card cvv and address for example…
A: The program is written in HTML, Javascript and CSS. The validation changes are highlighted in the…
Q: Which is an algorithmic form of a procedure? O A. function calc_area O B. area=length*breadth call…
A: Correct answer will be Option B Explanation: What most people say is that a procedure is something…
Q: Prompt the user to enter a value for gallons, which must be one of these values, 10, 15, 20, no…
A: In this question, we are asked to write a python program which converts gallon to quarts and pints 1…
Q: Which of the following statements invokes the CalcArea Sub procedure, passing it two variables by…
A: Statement invoking a procedure A procedure is a series of statements that can be stored in the…
Q: Adding a semicolon at the end of the for clause before the loop body is };for (int i-0; i<10; i++)…
A: Answer: Not an error(B)
Q: Which of the following Loop clauses will stop the loop only when the intAge variable’s value is less…
A: Solution: option a: Loop While intAge >=0 will stop the loop only when the intAge variable…
Q: Every text box’s KeyPress event procedure needs to be coded. True or False?
A: Text box's KeyPress event: A text box's KeyPress event occurs each time the user presses a key…
Q: Which of the following methods can be used to determine whether the strRate variable contains the…
A: Indexof: It is used to return the first index of the specified character or sub-string. If the…
Q: The strName variable contains the string “Jeffers”. Which of the following statements changes the…
A: Remove method: The remove method is used to delete the characters in the string that is starting…
Q: Write a statement that declares a procedure-level variable named dblSum. The variable should retain…
A: A variable which is declared as procedure-level is used to retain the value until the end of…
Q: Using the While keyword, write a Loop clause that processes the loop body as long as the value in…
A: Loop clause for processing the loop body A do while loop is a control flow statement used for…
Q: char variable in a
A: Step 1: “char” datatype“string” data type can hold text.Similarly to hold single character, C-Sharp…
Q: Which of the following For clauses indicates that the loop instructions should be processed as long…
A: The option b. is the correct answer. For intX As Integer = 10 To 99 This loop begins execution…
Q: In the receiving procedure’s header, you use the keyword __________to indicate that a variable is…
A: Passing arguments in Visual Basic The arguments can be passed to procedures in visual basic either…
Q: Which of the following conditions determines whether the number in the intNum variable is less than…
A: Answer: The correct option is “(b) intNum < 0 OrElse intNum > 1000”
Q: Which of the following If clauses will evaluate to True when the Bonus check box is selected? a. If…
A: Whether Bonus check boxes are selected or not is identified with its 'checked' property. So Option A…
Q: Le Chef Heureux Restaurant has 20 tables that can be reserved at 5 p.m., 7 p.m., or 9 p.m. Design a…
A: Given: Le Chef Heureux Restaurant has 20 tables that can be reserved at 5 p.m., 7 p.m., or 9 p.m.…
Q: In this exercise, you modify the Cerruti Company application from this lesson. Use Windows to make a…
A: Here is the Answer and Explanation
Q: Which of the following can be used to determine whether the strAmount variable contains exactly 10…
A: A string length() function length of a string. It returns total number of characters to count. The…
Q: Q.6/ Design a form with a text box. Use select statement so that when user enters g, b, r and y then…
A: According to the information given:- We have to create a form with a text box and take user input…
Q: Which of the following Do clauses will stop the loop only when the intAge variable’s value is less…
A: Do clauses stopping the loop A Do while is a control flow statement that executes a block of code…
Q: Which event is triggered when the computer processes the Me.Close() statement entered in the…
A: In Visual Basic, the programmer either click the close button present on a form's title bar or use…
Q: Using the Until keyword, write a Loop clause that stops the loop when the value in the strContinue…
A: Explanation: “Do Until” class runs until the given condition is met. The below statement is used to…
Q: Which flowchart symbol represents the condition in a multiple-alternative selection structure?
A: To solve this question, let us first understand what is multiple-alternative selection structure.…
Q: Which of the following statements does represent the code segment below? int R=5, X-2%3; if (R = 4)…
A: Initially value of R is 5 and X is 2
Q: Which of the following is a wrong statement? O Value to a variable should be given before using it O…
A: Variables in python are container that store values and it is created as soon as you assign a value…
Q: The items listed between the parentheses in a procedure header are called _____________ .a.…
A: Items appearing inside the parentheses of a calling statement are called arguments. Items appeared…
Q: Which type of selection structure provides instructions that are to be processed only when its…
A: Which type of selection structure provides instructions that are to be processed onlywhen its…
Q: The number of times the S value is çalculated within the condițion clause in the next code segment…
A: The modulus division is used to get the remainder after the integer division.
Q: If the strMsg variable contains the string “Her birthday is Friday!”, which of the following assigns…
A: The statement “intNum = strMsg.IndexOf("F")” assigns the number 16 to the variable “intNum”. Hence…
Q: Ask User to enter the No in the Text Field. When User Click the Print Table button, then table of…
A: Question given: Input a number using web form and prints its table. Programming Languages and…
Q: Using the While keyword, write a Do clause that processes the loop body as long as the value in the…
A: Using the While keyword, To write a Do clause that executes the loop body while the value of the…
Q: How many total stars will be displayed by each of the following program segments? A) for (row = 0;…
A: Part A will print 600 stars.
Q: What are the items that appear within parentheses in a procedure header called? a. arguments b.…
A: 1. Items that appear inside the parentheses of a calling statement are called arguments. 2. Items…
Q: Which of the following appears in a procedure header and associates the procedure with the btnPrint…
A: The btnprint control click event that that appears in the procedure header is Handles btnPrint.Click
Q: Q2/ Draw the flowchart required to determine whether a student passed or not (NOTE: the student have…
A: The flowchart is shown below.
Q: Which of the following is false? a. A Sub procedure can accept items passed either by value or by…
A: Procedure or method: A procedure is a set of instructions or code statements enclosed in an open…
Q: Create a sub procedure called Inventory that passes two parameters: cost and item. This procedure…
A:
Q: 10. Create a flowchart that will input for order number,total amount of order, amount tender then…
A: FLOWCHART -
Q: The loop controlled by the correct For clause from Review Question 13 will end when the intX…
A: Take the statement intX as integer = 10 to 99 Initializing the counter variable from 10 and end at…
Q: Write an If clause that determines whether the value in the dblPay variable is at least 10.45.
A: ANS: - If dblPay >= 10.45 Then
Q: Write an If clause that determines whether the strInput variable contains two numbers followed by an…
A: To include a two numbers, it is required to use the ## and to include a letter in the upper case use…
Control structures
Control structures are block of statements that analyze the value of variables and determine the flow of execution based on those values. When a program is running, the CPU executes the code line by line. After sometime, the program reaches the point where it has to make a decision on whether it has to go to another part of the code or repeat execution of certain part of the code. These results affect the flow of the program's code and these are called control structures.
Switch Statement
The switch statement is a key feature that is used by the programmers a lot in the world of programming and coding, as well as in information technology in general. The switch statement is a selection control mechanism that allows the variable value to change the order of the individual statements in the software execution via search.
Which of the following clauses will stop the loop when the value in the intPopulation
variable is less than the number 5000?
a. Do While intPopulation >= 5000
b. Do Until intPopulation < 5000
c. Loop While intPopulation >= 5000
d. All of the above.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- You are writing an application that uses the sqrt function. The program must reference the function using the name squareRoot.You need to import the function.Which code segment should you use? Group of answer choices D. from math.sqrt as squareRoot A. import math.sqrt as squareRoot B. import sqrt from math as squareRoot C. from math import sqrt as squareRootFunction for button "Publishing Date": • Name this function by your last name (for example, function yamoutl)). When the user clicks on the button "Publishing Date" (after filling all the textboxes), the current date and time will be printed after the text "Published on:" CSCI375 Grades Exam-1 (70 Exam-2 98 Project 86 Exam-3 80 Show the Grades Your Grades: Exam-1 - 78, Exam-2 - 98, Project - 85, Exam-3 - 80 Publishing Date Published on: 5/10/2021, 5:39:08 PM Change Background ColorProgram Purpose - Professional Athletes often hire other professionals to help take care of matters for them. We will group them in four categories: Lawyers, Personal Assistants, Agents, and Trainers. They all get paid a percentage of the athlete's total yearly salary. Lawyers - 10%, Personal Assistants - 3%, Agents - 7%, and Trainers - 5% . Prompt the user to enter the athlete's salary for the year (ensure that the entered value is positive). The user should then enter the name and category of each of the hired professionals. The athlete should be able to hire as many professionals in each category as he/she wants, even if it is more than he/she can afford. Based on the category, calculate the amount that each professional should be paid. After all data has been entered, print the names of each professional hired, how much each is being paid, the total amount the athlete paid, and how much the athlete has left.…
- Program Purpose - Professional Athletes often hire other professionals to help take care of matters for them. We will group them in four categories: Lawyers, Personal Assistants, Agents, and Trainers. They all get paid a percentage of the athlete's total yearly salary. Lawyers - 10%, Personal Assistants - 3%, Agents - 7%, and Trainers - 5% . Prompt the user to enter the athlete's salary for the year (ensure that the entered value is positive). The user should then enter the name and category of each of the hired professionals. The athlete should be able to hire as many professionals in each category as he/she wants, even if it is more than he/she can afford. Based on the category, calculate the amount that each professional should be paid. After all data has been entered, print the names of each professional hired, how much each is being paid, the total amount the athlete paid, and how much the athlete has left.To evaluate a int data type using switch, the evaluated variable needs to be enclosed in single quotation marks. True False! 1000$ by default, but discounts are applied to it based on different criteria. 1- Students get 20% discount. 2- People who purchase in 30 days in advance get 25% discount. 3- student purchasing 40 days in advance gets a 40% discount. This code segment calculates the final price. x = Text1.Text If x= "student" Then 1-... ElseIf x= "advance" Then price 1000 - 0.25 * 1000 ElseIf x= "stu_adv" Then price 1000 - 0.4 * 1000 2-...... price = 1000 3-..... 4-.. O = 1-price = 1000 - 0.2 * 1000 2-Else 3- End If 4-Print price 1-price 1000 - 0.2 * 1000 2-Else 3- Print price 4-End If 1-price = 3-End If 4-Print price = 1000 -0.2 * 1000 2-Elseif
- Name: Claz 4. Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case. The code segment below is intended to display all multiples of 5 between the values start and end, inclusive. For example, if start has the value 35 and end has the value 50, the code segment should display the values 35, 40, 45, and 50. Assume that start and end are multiples of 5 and that start is less than end. Line 1: i + start Line 2: REPEAT TIMES Line 3: { DISPLAY (i)oplev a bonin vimobn ldemyA i + i + 5 Line 4: Line 5: Line 6: } Which of the following could replace in line 2 so that the code segment works as intended? wlf a0wollo 1 end - start + 1 b. end start + 6 (( end - start) / 5) + 1 d. 5 * (end - start) + 1 а. C.Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints? ≤ ? ≤ ???? ≤ ?, ? ≤ ???? ≤ ? ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints1 ≤ T ≤ 1001 ≤ X, Y ≤ 1031 ≤ Z ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…
- You are writing an application that uses the sqrt function. The program must reference the function using the name squareRoot.You need to import the function.Which code segment should you use? Group of answer choices from math.sqrt as squareRoot import sqrt from math as squareRoot from math import sqrt as squareRoot import math.sqrt as squareRoot""" MovieGuide.py This program allows each theater patron to enter a value from 0 to 4 indicating the number of stars that the patron awards to the Guide's featured movie of the week. The program executes continuously until the theater manager enters a negative number to quit. At the end of the program, the average star rating for the movie is displayed. """ # Initialize variables. totalStars = 0 # total of star ratings. numPatrons = 0 # keep track of number of patrons averageStars = 0 numStars = 0 # Get input. numStarsString = input("Enter rating for featured movie: ") # Convert to double. numStars = float(numStarsString) # Write while loop here while numStars >= 0 and numStars <= 4: numPatrons = numPatrons + 1 # incrementor totalStars = totalStars + numStars # Get input. numStarsString = input("Enter rating for featured movie: ") # Convert to double. numStars = float(numStarsString) # Calculate average star rating averageStars - totalStars / numPatrons print("Average…Assume that grade is a variable whose value is a letter student_grade-- any one of the following letters: 'A', 'B', 'C', 'D', 'F". Assume further that there are the following int variables, declared and already initialized: acount, bcount, ccount, dcount, fcount. Write a switch statement that increments the appropriate variable (acount, bcount, ccount, etc.) depending on the value of grade. So if grade is 'A' then acount is incremented; if grade is'B' then bcount is incremented, and so on.