A ____ is a structure that allows repeated execution of a block of statements.

a.
loop control

b.
loop

c.
body

d.
Boolean expression

Answers

Answer 1

Answer:

loop

Explanation:

Loop is the one which is used to execute the specific statement again and again until the condition is true.

In the programming, there are 3 basic loop used.

1. for loop

Syntax:

for(initialization, condition, increment/decrement)

{

  statement;

}

the above statement execute until the condition in the for loop true when it goes to false, the loop will terminate.

2. while loop

Syntax:

initialization;

while(condition)

{

  statement;

increment/decrement;

}

it is work same as for loop and the increment/decrement can be write after or before the statement.

3. do while

syntax:

initialization;

do

{

   statement;

   increment/decrement;

}while(condition);

here, the statement execute first then, it check the condition is true or not.

so, if the condition is false it execute the statement one time. this is different with other loops.

Answer 2

Final answer:

A loop is a structure that allows repeated execution of a block of statements in programming. It is controlled by a condition that, when false, will terminate the loop to prevent an infinite loop.

Explanation:

The correct answer to the question is b. loop. A loop is frequently used in programming to allow the repeated execution of a block of statements until a specified condition is met. Loops are a form of conditional control flow that can drastically alter the execution path of a program.

For instance, a while-loop will continue to execute so long as its condition remains True. If the condition evaluates to False, the loop terminates and control is passed to the statements that follow. During each iteration within the loop, it is essential to modify some variables, such as the iteration variable, to ensure the loop does not continue indefinitely, potentially leading to an infinite loop.


Related Questions

There is no reason to put comments in our code since we knew what we were doing when we wrote it. TRUE

Answers

Answer:

False: There are reasons to put comments in our code. We should have the habit of that.

Explanation:

sometimes when we start to debug our program due to some error in execution, we don't recognize properly which code we have written for what purpose.if we distribute the code to others as a team, others get the intention of our code more clearly due to comments.The code can be reused taking it's sections to form an other program, where the comments has a vital role.

What are the first and the last physical memory addressesaccessible using
the following segment values?
a) 1000
b) 0FFF
c) 0001
d) E000
e) 1002

Answers

Answer

For First physical memory address,we add 00000 in segment values.

For Last physical memory address,we add 0FFFF in segment values.

NOTE-For addition of hexadecimal numbers ,you first have to convert it into binary then add them,after this convert back it in hexadecimal.

a)1000

For First physical memory address, we add 00000 in segment value

We add 0 at the least significant bit while calculating.

          10000 +00000 = 10000 (from note)

For Last physical memory address,We add 0 at the least significant bit while calculating.

   we add 0FFFF in segment value

           10000 +0FFFF =1FFFF    (from note)

b)0FFF

For First physical memory address,we add 00000 in segment value

We add 0 at the least significant bit while calculating.

     0FFF0 +00000=0FFF0 (from note)

For Last physical memory address,We add 0 at the least significant bit while calculating.

   we add 0FFFF in segment value

           0FFF0 +0FFFF =1FFEF (from note)

c)0001

For First physical memory address,we add 00000 in segment value

We add 0 at the least significant bit while calculating.

     00010 +00000=00010 (from note)

For Last physical memory address,We add 0 at the least significant bit while calculating.

   we add 0FFFF in segment value

           00010 +0FFFF =1000F (from note)

d) E000

For First physical memory address,we add 00000 in segment value

 We add 0 at the least significant bit while calculating.

    E0000 +00000=E0000 (from note)

For Last physical memory address,We add 0 at the least significant bit while calculating.

   we add 0FFFF in segment value

           E0000 +0FFFF =EFFFF (from note)

e) 1002

For First physical memory address,we add 00000 in segment value

 We add 0 at the least significant bit while calculating.

    10020 +00000=10020  (from note)

For Last physical memory address,We add 0 at the least significant bit while calculating.

   we add 0FFFF in segment value

           10020 +0FFFF =2001F (from note)

T F A stub is a dummy function that is called instead of the actual function it

represents.

Answers

Answer: True, stub function is a dummy function that is called instead of actual function.

Explanation: A stub function is a function which has the name , parameters of a function but is used for production of the dummy output which is in correct form. It is put in a function so that it becomes convenient when a function is called it can be tested before it is completely written which saves the execution of wrong code.Therefore the given statement is true.

vertical exchanges are typically used only to buy and sell materials required for an organization's support activities ( True or false)

Answers

Answer:

Vertical exchanges are typically used only to buy and sell materials required for an organization's support activities- False

This statement is false.

True / False
. Fixed length instruction sets are generally slower to execute than variable-length instruction sets.

Answers

Answer: False

Explanation:

Fixed length instructions are faster than variable length instruction because the fixed length instruction uses one clock cycle for their instruction whereas variable instruction takes more than one clock cycle. As RISC uses fixed length instruction and its CPI(cycles per instruction) is less compared to CISC which uses variable length instructions.

So fixed length instruction sets are faster than variable length instruction.

Write a C++ code that will read a line of text and echo the line with all uppercase letters deleted. Assume the maximum length of the text is 80 characters. Example input/output is shown below.

Input:

Today is a great day!

Output:

oday is a great day!

Answers

Answer:

#include<bits/stdc++.h>

using namespace std;

int main()

{

   string st;

   getline(cin,st);

   int i=0;

   while(i<st.length())

   {

       if(isupper(st[i]))

       {

           st.erase(st.begin()+i);

           continue;

       }

       i++;

   }

   cout<<st<<endl;

   return 0;

}

Explanation:

I have included the file bits/stdc++.h which include almost most of the header files necessary.

For taking the input as a string line getline is used.

For checking the upper case isupper() function is used. cctype header file contains this function.

For deleting the character erase function is used.

public class Myfile { public static void main (String[] args) { String biz = args[1]; String baz = args[2]; String rip = args[3]; System.out.println("Arg is " + rip); } } Select how you would start the program to cause it to print: Arg is 2 A. java Myfile 222 B. java Myfile 1 2 2 3 4 C. java Myfile 1 3 2 2 D. java Myfile 0 1 2 3

Answers

Answer:

java MyFile 1 3 2 2

Explanation:

Option is is the correct answer, whatever we pass as commadD line arguments can be accessed using String array args by passing index

Array indexes starts with zero, in our case when we say

java MyFile 1 3 2 2

its going to be store like args[0] = 1, args[1] = 3, args[2] = 2, args[3] = 2

now we are saying  System.out.println("Arg is " + rip);

it means its going to print Args is with value of rip i.e. 2 (rip=args[3])

Write a program to display a message telling the educational level of a student based on their number of years of school. The user should enter a number indicating the number of years of school, and the program should then print the corresponding message given below. Be sure to use named constants rather than any numbers other than 0 in this program.

Answers

Answer:

#include <iostream>

using namespace std;

int main()

{

   int years;

   cout<<"enter the number of years of school: ";

   cin>>years;

   cout<<"The educational level is: "<<years<<endl;

}

Explanation:

First include the library iostream in c++ program for input/output.

then create the main function and declare the variable.

after that, display the message by using cout instruction for asking the user to enter the value.

then, cin instruction store the value in the declare variable.

finally, display the message with corresponding value.

Final answer:

The provided Python program prompts for a score between 0.0 and 1.0, validates the input, and then outputs the corresponding grade or an error message if the input is not a number or out of range.

Explanation:

Here is a Python program that prompts for a score between 0.0 and 1.0, checks whether the score is in the valid range, and then prints the corresponding grade based on the score provided:

# Define named constants for grade thresholds
GRADE_A = 0.9
GRADE_B = 0.8
GRADE_C = 0.7
GRADE_D = 0.6
try:
   score = float(input('Enter a score between 0.0 and 1.0: '))
   if score < 0.0 or score > 1.0:
       print('Error: Score is out of range.')
   elif score >= GRADE_A:
       print('A')
   elif score >= GRADE_B:
       print('B')
   elif score >= GRADE_C:
       print('C')
   elif score >= GRADE_D:
       print('D')
   else:
       print('F')
except ValueError:
   print('Error: Please enter a numeric input.')
The program uses try and except blocks to handle non-numeric inputs gracefully, outputting an error message in such cases. Depending on the score entered by the user, the appropriate grade is printed using comparison operations against the named constants defining grade thresholds.

Whichmultiplexing technique involves signals composed of lightbeams?

1 TDM

2 FDM

3 WDM

4 None of theabove

Answers

Answer:

3.WDM

Explanation:

WDM ( wavelength division multiplexing ) involves signals composed of light beams WDM is used in communication where fibers are used it is used for multiplexing of number of carrier signals  which are made of optical fibers by using different wavelength of laser light it has different wavelength so this WDM is used for signals composed of light beams it has property of multiplexing of signal

True of False - use T or FThe Exception class can be extended.

Answers

Answer:

T

Explanation:

java.lang.Exception class can be extended. That is you can define subclasses for the Exception class. In fact all out of the box Exception classes in Java like java.io.IOException, java.lang.NumberFormatException, javax.jms.JMSException extend the base class java.lang.Exception or its subclasses. The subclassing is valid because Exception class is not declared as a final class.

Answer:

true

Explanation:

Is the Internet a LAN or a WAN?

give the answer at least five line for one question

Answers

Answer:

Internet is a WAN (wide are network)

Explanation:

Great question, it is always good to ask away and get rid of any doubts that you may be having.

The Internet is a worldwide interconnected network with computers acting as nodes around the world. Communicating and sharing information between one another. LAN and WAN are connection types for the Internet.

LAN is a Local Area Network, which interconnects local computer nodes physically using Ethernet cables. Which are then connected to the internet itself.

WAN are wide area networks, which are usually interconnected through public communication services such as telephone cable.

Therefore the Internet is a WAN (wide are network)

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

What is the cause of thrashing?How does the systemdetect thrashing.Once it detects thrashing what can the system doto eliminate this problem

Answers

Answer:

Thrashing :- It is a situation when the system most of it's time is handling page faults, but the actual work done by CPU is very less.

Thrashing is caused by when a process is allocated too few number of frames, then there will be continuous page faults.The actual Utilization of CPU is very less.

Thrashing detection can be done by the system by determining the CPU Utilization as compared to degree of multi programming if it comes out to be less then there is thrashing.

Thrashing can be eliminated by decreasing the Degree of multi programming.

A while loop's body can contain multiple statements, as long as they are enclosed in braces



True False

Answers

Answer:

True

Explanation:

while loop is used to execute the statement again and again until the condition is true. if condition False program terminate the while loop and start execute the statement outside the loop.

syntax:

initialize;

while(condition)

{

  statement 1;

  statement 2;

   to

  statement n;

}

we can write multiple statement within the braces. their is no limit to write the statement within the body of the while loop.

while terminate only when condition false

True of False - use T or F An abstract class can be extended by another abstract class.

Answers

Answer:

T

Explanation:

an abstract class can be extended by another.the abstract class which is extending should be implemented by another class

What is Software Testing ? How many types of testing we mayutilize for a component using CBSE approach ?

Answers

Answer:

Software testing is defined as, it the process of evaluation of the functionality of the system software application to check whether the software met the specified requirement or not and also used to identify defects which ensured that the product is free from all defects in order to produce the quality products.

Types of testing we may utilize for a component using CBSE approach are:

As, CBSE stands for the component based software engineering where  programmers should design and implemented software components in such a way that many different program can reuse them.

Unit testing Integration testing System testing

Other Questions
PLEASE HELP!!!!Geography InfluencesHow has each of the following affected settlement, trade, and government in your country?Land features -Water features -Climate -Location -Natural resources -Industries - Why is it important not to misuse or overuse antibiotics?A- Antibiotics will begin to rupture healthy cells.B- Viral infections will become more prominent.C- Bacteria will evolve, leading to the development of resistant bacteriaD- Normal flora will become pathogens. Perggy's Bakes, a bakery in New Orleans that exclusively sells its confectionery products online, makes its products only when it receives an order. The bakery produces the products as per the order and delivers to the customer's homes. It does not produce any excess products. In the given scenario, the price associated with the demand and supply of the products at Perggy's Bakes reflects the _____. Montegut Manufacturing produces a product for which the annual demand is 12,500 units. Production averages 80 units per day, while demand is 50 units per day. Holding costs are $5.00 per unit per year, and setup cost is $150.00. (a) If the firm wishes to produce this product in economic batches, what size batch should be used? (b) What is the maximum inventory level? (c) How many order cycles are there per year? (d) What are the total annual holding and setup costs? A'B'C'D' is the image of ABCD. What transformation(s) would result in this image? Why did some Americans support aid for France during the French Revolution? (A) They saw it as a way to insult Great Britain and solidify their own principles.(B) They saw it as an opportunity to develop a permanent alliance with France. (C) They saw it as important to prevent Great Britains interference in the event. (D) They saw it as an obligation for Frances support during their own revolution. In May you used 600 kilowatts-hours of energy for electricity. Calculate your average power use in watts. Identify the explicit function for the sequence in the table. A magnetic disk has an average seek time of 8 ms. The transferrate is 50 MB/sec. Thedisk rotates at 10,000 rpm and the controller overhead is 0.3msec. Find the average time to read or write 1024 bytes. Short essay questions1) What is Green Business? one paragraph2) How do markets interact with ecologies? one paragraph3) Describe global ecological integrity and the benefits it brings.4) What can we do with our newfound knowledge (mention some of the above)?I need help just with numbers 1 and 2 please. A system gains 757 kJ757 kJ of heat, resulting in a change in internal energy of the system equal to +176 kJ.+176 kJ. How much work is done? ????=w= kJkJ Choose the correct statement. Work was done on the system. Work was done by the system. ---------------- is an operating systems ability to be easily enhanced over timea) performanceb) portabilityc) reliabilityd) extensibility When we share our reflective interpretations, analyses, evaluations, and inferences, we are offering explanations. Because of this, critical thinking can be described as ________. A. an engine of reactive System-1 thinking B. unrelated to decision making C. self-regulated System-2 thinking D. an irrational driver of associational decision making What is speciation?OA. The radiation of adaptations through a speciesB. The flow of genetic information between organismsOC. The isolation of two parts of a populationOD. The formation of two or more species from a common ancestor MAJOR HELPPPP!!!!An earthquake registered 7.4 on the Richter scale. If the reference intensity of this quake was 2.0 10^11, what was its intensity? The explosion of Mexico Citys population beginning in the 1960s was the result of: a) municipal annexation. b) increasing birth rates. c) international migration. d)internal migration. A 150-pound person will burn100 calories while sitting still for1 hour. Using this ratio, how manycalories will a 100-pound personburn while sitting still for 1 hour?A. 666 2/3 caloriesB. 66 2/3caloriesC. 6 2/3 calories What type of Microsoft Server serves as an email server?Your sister asks you if it is possible to get an office productivity suite for free. What do you tell her? Which laws regulate driver behavior? A.Air bag regulations B.Jaywalking laws C.License plate laws D.Intersection rules The maximum magnitude of the magnetic field of an electromagnetic wave is 13.5 . (3396) Problem 3: What is the average total energy density (in 1m3) of this electromagnetic wave? Assume the wave is propagating in vacuum.