Question about Python Vehicle Parts & Accessories

1 Answer

Write a program which prints out the decimal equivalents of the series of fractions 1/2, 1/4, 1/8, 1/16, etc. in a column. (You can't continue this forever, but do it for fourteen steps.) Now print a column beside this one with the sum of all the fractions printed up to that point. The numbers should start .5, .75, .875, etc. Because the intermediate results are wanted, one cannot dispense with a loop. Can the sum ever reach the total one? Why or why not? Program requirement: Python. Short writeup ? Design (10 marks) ? Name, CMPT140, Lab 1, date ? Statement of the problem ? Discussion of solution strategy ? Code (30 marks) ? Name, etc. again in code header ? Well-commented code, formatted and indented ? Clear, well-chosen identifiers (variable names) ? Output (10 marks) ? A couple runs with different input

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Vice President:

    An expert whose answer got voted for 100 times.

  • Expert
  • 284 Answers

You don't really expect us to do your home work for you do you?
You won't learn anything if we do that :)

Why don't you have a go at it and if you get stuck ask here for help.

Posted on Oct 02, 2009

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

2 Answers

What fraction is equivalent to 2/3


4/6
6/9
8/12
10/15

etc. Just keep multiplying by the same number on both sides.

Apr 17, 2017 | Office Equipment & Supplies

2 Answers

How do I change a percentage to a fraction


Use this http://www.calculatorsoup.com/calculators/math/percent-to-fraction-calculator.php
OR to work it out yourself.....#

How to convert percent to fraction

  1. Divide the percent by 100 to get decimal number.
  2. Count the number of digits (d) to the right of the decimal point of the decimal number.Example: 2.56 has 2 digits to the right of the decimal point, so d=2.
  3. Calculate the factor (f) for making the decimal number an integer: f = 10 to power d
    Example:
    f = 10 power 2 = 100
  4. Multiply and divide the decimal number x by the factor f: x * f / f = y / f
    Example:
    2.56 * 100 / 100 = 256 / 100
  5. Find the greatest common divisor (gcd) of the fraction. Example:
    gcd(256,100) = 4
  6. Reduce the fraction by dividing the numerator and denominator by the gcd value: Example:
    256 / 100 = (256/4) / (100/4) = 64/25
Example One percent is equal to one hundredth:
1% = 1/100
So in order to convert percent to fraction, divide the percent by 100% and reduce the fraction.
For example 56% is equal to 56/100 with gcd=4 is equal to 14/25:
56% = 56/100 = 14/25

Sep 07, 2014 | Office Equipment & Supplies

1 Answer

Two repeating decimals equivalent to a fraction with the denominator 10


A number with a periodic decimal representation cannot be equivalent to a fraction with denominator 10 (or a multiple of 10) except if the repeating decimals are zeros.
0.454545...=45/99=5/11

Sep 04, 2013 | Super Tutor Pre Algebra (ESDPALG)

1 Answer

What button do you use for a fx-115ms calculator to change a decimal to its fractional equivalent


Pressing the [a b/c] Converts the displayed value between fraction and decimal form.

May 07, 2011 | Casio FX-260 Calculator

1 Answer

How do I convert any decimal into a fraction?? ex: sin45 is 0.8509035245 (press which buttons to make a fraction)


Not all decimal representations have equivalent fractions. Take pi. Its approximate value as given by the Casio FX9750II is 3.141592654. This is just an approximation because the string of decimal digits in pi has no end. It continues . Such a number that cannot be represented by a ratio of two integers is not rational, not a fraction. It is called irrational.Other such numbers are ?2, ?3,?5, e the base of natural logarithms.
As a matter of principle, if a number is called irrational, it is because it is not rational (not a fraction), and it makes no sense to try to cast it into fraction form.

However, if you truncate an irrational number so as to keep only a finite number of decimal digits, then that truncated number can be represented by a fraction, but qualitatively speaking, it is not the original irrational number.
Thus if you decide to use 3.141500000000000000....0 as an approximate value of pi then you write
3.1415=31415/10000 and the calculator will convert it to the mixed fraction 3u283u2000. To effect this conversion, you press the [FD] key to the right of [a b/c]. If you want an improper fraction 6283u2000 you press [SHIFT][[FD].

As to the value of sin 45 you quote, you should be aware that it is valid for an angle unit in radians.
It is an approximation because the radian unit is based on the value of pi, which, as I said above, is an irrational number.
If you use the degree angle unit, sin45 deg is actually equal to 1/?2 or ?2/2 and this is clearly irrational, and it cannot be represented as a fraction. In conclusion it makes no sense to try to cast it into such form.
On the other hand, sin 30 deg or cos 60 deg are both exactly equal to 1/2. The calculator will convert them to a fraction.

On a more general note, the calculator will always be able to convert a fraction into an approximate decimal number, but the converse may not be possible. It depends on the number of display space available on the screen.

Feb 02, 2011 | Casio FX9750GII Graphic Calculator

1 Answer

Convert .714285 to the fraction 5/7?


Say you have a repeating decimal number 0.714285 714285 714285 etc. You identify the period (the repeating part) and in this case it is 714285.
Y
ou count the number of decimal places in the period: here it is 6. Your equivalent fraction is
Fraction= period/(99...9) where the number of 9's in the denominator is equal to the number of decimal places in the period. For this case, that is 6.
Thus
0.714285 714285 714285 etc.= 714285 / 999999

Reduce the fraction and you will find 5/7

This technique works for a repeating decimal number where the period starts just after the decimal mark.

If the periodic part does not start right after the decimal mark there are modifications to be made.

Jan 16, 2011 | Office Equipment & Supplies

1 Answer

How do i change my calculator from fraction answers to decimal when i'm dividing


If the fraction has just be typed in, press [SHIFT][=] instead of just [=] to get the result displayed as a fraction. However the fraction displayed will be the irreducible form of your fraction (equivalent but reduced to its simplest terms).

If you do not want fractions at all ( input and output)
Press [SHIFT][MODE] and select [2:LineIO]. This is the entry mode of the old generation of calculators.

The other IO mode is MthIO: In this mode fractions are entered as in textbooks, radicals are also entered as in a textbook. If by any chance you like this new IO format but just want the final results displayed as decimal, you can do your calculations in MthIO to get the result. Once displayed the result can be converted into decimal format by pressing the [S<>D] key.

Aug 26, 2010 | Casio FX-115ES Scientific Calculator

1 Answer

How do you convert decimals to fractions?


With the decimal value on the screen, press 2nd F<>D.

F<>D is on the PRB key, second row, second column.

Jul 02, 2010 | Texas Instruments TI-30 XIIS Calculator

2 Answers

When doing division only displays answer in fractions, for example 8/9 gives me 8/9 rather than the decimal equivalent


  1. Press [S<=>D] key to toggle between fractions/radicals and decimal numbers.
  2. Alternatively, press [SHIFT][=] instead of [=] to force display to be in decimal format.
  3. More permanently, press [SHIFT] [MODE] to access (SETUP) screen, then select [ 2:LineIO]

Mar 11, 2010 | Casio FX-115ES Scientific Calculator

1 Answer

How do you put in fractions


Three was I know of... a fraction is recognized by a calculator...
if you want to put in the decimal equivalent as example..
one half is .5
or 1/2
and it will only display the decimal equivalent.
Then there is scientific notation EE
EG... .5 = 1/2 = 5.0 EE-1

Aug 10, 2009 | Texas Instruments TI-83 Plus Calculator

Not finding what you are looking for?
Vehicle Parts & Accessories Logo

Related Topics:

47 people viewed this question

Ask a Question

Usually answered in minutes!

Top Python Vehicle Parts & Accessories Experts

rjivaro

Level 2 Expert

153 Answers

AzVip

Level 2 Expert

114 Answers

D. E. Hev

Level 3 Expert

1167 Answers

Are you a Python Vehicle Part and Accessory Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...