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
fgiga [73]
3 years ago
6

The scope of a variable declared within a for() loop is:

Computers and Technology
1 answer:
Leni [432]3 years ago
5 0

Answer:

a

Explanation:

The variable declared in the for is accessible only within the for loop  and it goes out of scope once the loop get end

eg : for(int i=1;i<=10,i++) // variable i is declared

{

// variable i is visible only in this block,

}

//After this the variable i goes out of scope

You might be interested in
Directions: pick the right letter for each number.
Ede4ka [16]

1. Upgrading RAM increases run speed.

2. Upgrading Hard Drive increases memory.

3. Adding more ROM to it..?

8 0
3 years ago
Read 2 more answers
A person you respect who offers you advice and assistance is known as a(n) _____.
Archy [21]
This would be a mentor-D. They role is to mentor or guide you with advice or assistance. A role model is a similar answer in that they respect you, but they might not offer advice or assistance which makes it incorrect.
7 0
3 years ago
Package Newton’s method for approximating square roots (Case Study 3.6) in a function named newton. This function expects the in
notka56 [123]

Answer:

import math

#Initialize tolerance

tolerance = 0.000001

def newton(x):

   """ Returns the square root of x """

   #Performs the successive approximations

   estimate = 1.0

   while True:

       estimate = (estimate + x / estimate) / 2

       difference = abs(x - estimate ** 2)

       if difference <= tolerance:     # Break out of loop if difference is less than tolerance

           break            

       return estimate     # While the difference value is > TOLERANCE, the process continues

def main():

   """Allows the user to obtain square roots."""

   while True:

       #Receive the input number from the user

       x = input("Enter a positive number or enter/return to quit: ")

       if x == "":     #if user presses "Enter" then exit the program

           break       # Otherwise, continue the process of allowing new numbers

       x = float(x)

       #Output the result

       print("The programs estimate of the square root of ", x, "is ", round(newton(x),2))

       print("Python's estimate: ", math.sqrt(x))

main()

8 0
3 years ago
What does PRAM stand for?
Nana76 [90]
<span>PRAM- Phase-Change Random Access Memory</span>
7 0
3 years ago
Read 2 more answers
The attribute that comes naturally to a person, such as manual dexterity, is called
Effectus [21]
The answer is Ability. 
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which payment type is best if you are trying to sick to a budget?
    15·1 answer
  • One of the most toxic components of a computer is the
    11·1 answer
  • Advantages of e commerce
    14·1 answer
  • A hacker scanning a web server is likely to be identified by the target's web a. Because of the FBI's Carnivore scanning program
    12·1 answer
  • Click cell C6 in the Data worksheet and insert a column. Type Series Name in cell C6. Click cell C7 in the Data worksheet and in
    9·1 answer
  • In the cis configuration, the methyl groups are placed _____.
    8·2 answers
  • Edhesive coding practice 3.4​
    13·2 answers
  • Draw a flowchart to find the average grade in 3 subjects
    7·1 answer
  • How does 5G technology enhance the Internet of Things (ioT) ?
    8·1 answer
  • Why does python code generate fewer types of syntax errors than code in other programming languages?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!