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

Ad

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

Ad

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 there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this 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.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

1 Answer

I am trying to divide on my calculator and it keeps on giving my the equivalent fraction as an answer! How do I stop this??? MIdterm Exam tomorrow!!!


LEARN HOW TO DO MATH WITHOUT A CALCULATOR!!!..AND LEARN MATH PERIOD!!!!...ie.. learn how to break down a fraction to a decimal equivalent!!

Sep 18, 2017 | The Office Equipment & Supplies

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

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

Kevin Daniels

Level 3 Expert

1455 Answers

Donald DCruz
Donald DCruz

Level 3 Expert

17130 Answers

richie46

Level 3 Expert

12962 Answers

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

Answer questions

Manuals & User Guides

Loading...