1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
deff fn [24]
3 years ago
14

What is a for command? can u use a variable instead of a number in the for command!​

Computers and Technology
1 answer:
Ierofanga [76]3 years ago
8 0

Answer:

A for loop is a block of code where a certain instruction repeats a certain amount of times.

Yes, you can use a variable instead of a number in a for loop.

Explanation:

For example, you're using a for loop and you want to repeat it a certain amount of times, but you want to take user input. You would ask the user for their input and assign it to a variable, then use that variable for the for loop.

You might be interested in
Which symbol is at the beginning and end of a multiline comment block? &&& """ %%% ###
yawa3891 [41]

Answer:

#

Explanation:

I have notes on it we learned it in 8th

7 0
3 years ago
How is sharepoint used in organization today?
tatyana61 [14]
<span>To build a team site and collaborate with your colleagues</span>
8 0
3 years ago
I need to create a method named "root positive". which will either print the square root of the number passed to it or if the nu
rjkz [21]

Answer:

Explanation:

The following code is written in Java. It is a method that calculates the square root of a number as requested. The method first checks with an IF statement if the parameter value is a positive number and then calculates the square root and prints it to the screen. Otherwise, it prints Number must not be negative. A test case has been provided in the main method and the output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter a number of type double to calculate square root:");

       double num = in.nextDouble();

       rootPositive(num);

   }

   public static void rootPositive(double num) {

       if (num > 0) {

           System.out.println(Math.sqrt(num));

       } else {

           System.out.println("Number must not be negative.");

       }

   }

}

5 0
3 years ago
The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0,
TEA [102]

Answer:

ranforce = randi([0, 12]);

if (ranforce == 0)

     disp('There is no wind')

else  if(ranforce>0 && ranforce <7)

     disp('There is a breeze')

else  if(ranforce>6 && ranforce <10)

     disp('This is a gale')

else  if(ranforce>9 && ranforce <12)

     disp('It is a storm')

else  if(ranforce==12)

     disp('Hello, Hurricane!')

end

Explanation:

<em>Replace all switch case statements with if and else if statements.</em>

<em>An instance is:</em>

<em>case {7,8,9}</em>

<em>is replaced with</em>

<em>else  if(ranforce>9 && ranforce <12)</em>

<em>All other disp statements remain unchanged</em>

5 0
3 years ago
You are applying for a secretary position. You have many skills but which of the following would not be one to include on the ap
zepelin [54]

A. How many marathons you have run, because it doesn't relate to the job you're applying for.

6 0
3 years ago
Read 2 more answers
Other questions:
  • The internet is an example of
    12·2 answers
  • Write the execution steps if the input is a lion.
    11·1 answer
  • What is the name of the domain controller database that windows server 2016 uses to store data about user access and resources o
    10·1 answer
  • Communication is defined as__________.
    10·1 answer
  • Check my work a(n) ________ reference is an automatically created variable that holds the address of an object and passes it to
    15·1 answer
  • What is lasso tool write the name of any modelling and animation software<br>​
    8·1 answer
  • Write a program that asks the user to enter two integer numbers X and Y. The program halves each number between X and Y then pri
    15·1 answer
  • Hey system has defined specific Quetion that describe how signals are sent over connections. Which layer of the transmission con
    11·1 answer
  • You are configuring NIC teaming on a server with two network adapters. You chose Switch Independent Mode. You now must choose be
    15·1 answer
  • How do I find a back door password on my computer?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!