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
Nadusha1986 [10]
3 years ago
5

Discuss a situation in which you might want to use a floating-point number with a fractional part for a loop control variable. W

hat are the pitfalls of using real numbers for the index variable in a for loop?
Computers and Technology
1 answer:
serious [3.7K]3 years ago
7 0

Answer:

1. When calculating the division of each number in some range of floating type number.

2. One cannot use real numbers for exact comparison. Two real numbers are rarely equal. Real numbers are have representational errors.

Explanation:

1. In structured programming, we make use of a floating-point number with a fractional part for a loop control variable. a given scenario is when we just want to calculate the division of each number in some range of floating type number. However, the downsides to using a floating-point number with a fractional part for a loop control variable are:

  • They can cause 'off-by-one' failure
  • A floating point number cannot represent all simple fractions exactly

2. The pitfalls of using real numbers for the index variable in a for loop:

  • Two real numbers are hardly equal
  • One cannot use real numbers for exact comparison
  • The existence of representational errors
You might be interested in
Which of the following Information Technology career fields generally requires the lowest level of education for an entry-level
Art [367]
I believe the correct answer from the choices listed above is option A. The <span> Information Technology career fields that generally requires the lowest level of education for an entry-level position would be </span><span>Information Services and Support. Hope this answers the question.</span>
5 0
3 years ago
Read 2 more answers
Which keyboard shortcut can you use to copy data from a cell? HURRY UP PLZ RIGHT NOW HURRY.
Romashka-Z-Leto [24]
The keyboard shortcut used to copy data from a cell is A.) Ctrl + c command +C

I hope this helped!! :)
7 0
3 years ago
Read 2 more answers
Help With Sims 4
Norma-Jean [14]

You should probably try removing it one by one if you dont want to get rid of all of it. it might take some time but,,,,

4 0
3 years ago
Write a script that creates a user-defined database role named paymententry in the ap database. give update permission to the ne
Kazeer [188]

Answer:

USE AP CREATE ROLE PaymentEntry

GRANT UPDATE, DELETE ON Invoices TO PaymentEntry

GRANT UPDATE, INSERT ON InvoiceLineItems TO PaymentEntry

EXEC sp_AddRoleMember db_datareader, PaymentEntry

7 0
3 years ago
Rico is working on a document titled ‘Document1’. Which is most likely the case for Rico’s document?
Natasha2012 [34]
A. He has not saved the document yet.
reason being is that most documents today will change their title on what it is thats written on the paper unless you personally change it yourself
8 0
3 years ago
Read 2 more answers
Other questions:
  • Pick the correct statements regarding cell references.
    8·2 answers
  • Which form of Internet access currently uses a technology called 4G?
    15·2 answers
  • Give sally sue specific suggestions on how she can improve her powerpoint skills
    5·1 answer
  • DSSS uses a chipping code to encode redundant data into the modulated signal. Which two of the following are examples of chippin
    12·1 answer
  • When a person devises the idea for the venture, develops a business plan, uses savings or loans to acquire other resources and a
    9·1 answer
  • If you’re storing some personal information like Debit/Credit card numbers or Passwords etc, on different sites for running you’
    10·1 answer
  • In order to make schemas that will appear in the Schema Library available in the XML Options dialog box, what file extension sho
    10·1 answer
  • Assume we have two lists, list A and list B. List A contains the numbers [20,10,20], while list B contains the numbers [40,10,30
    10·1 answer
  • X = 9 % 2<br><br> if (x == 1):<br>   print ("ONE")<br> else:<br>   print ("TWO")
    5·2 answers
  • Organizations can face criminal or civil penalties for being ______ in protecting their sensitive data.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!