Python Forum
Sum Series w/ Fractions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sum Series w/ Fractions
#1
Good Morning,

I am new to programming and these forums. I plan on becoming a little more active here and on IRC while working toward my degree.

This morning I'm trying to work toward an assignment I have yet to start/complete. I did class work on the subject last Friday so I have an idea how loops work.

The homework I'm doing is just like the class work, except it uses fractions instead to sum. When I change the loop condition to a fraction number I get the floating point error because I believe the loop wants integers.

If someone could give me an idea where to inject fractions or point to a reference where I could find out more I'd appreciate it. Thanks

This is a sample of the class work loop (PYTHON 3): 
sum = 0

for count in range(0, 10, 1):
  print((count+1), end=" ")

print(" = ", sum)
Reply


Messages In This Thread
Sum Series w/ Fractions - by EwH006 - Oct-10-2016, 02:42 PM
RE: Sum Series w/ Fractions - by ichabod801 - Oct-10-2016, 03:19 PM
RE: Sum Series w/ Fractions - by EwH006 - Oct-10-2016, 05:14 PM
RE: Sum Series w/ Fractions - by ichabod801 - Oct-10-2016, 05:23 PM
RE: Sum Series w/ Fractions - by EwH006 - Oct-10-2016, 06:07 PM
RE: Sum Series w/ Fractions - by EwH006 - Oct-10-2016, 06:23 PM
RE: Sum Series w/ Fractions - by Mekire - Oct-10-2016, 06:27 PM
RE: Sum Series w/ Fractions - by EwH006 - Oct-10-2016, 10:47 PM
RE: Sum Series w/ Fractions - by ichabod801 - Oct-10-2016, 06:14 PM
RE: Sum Series w/ Fractions - by Mekire - Oct-10-2016, 06:14 PM
RE: Sum Series w/ Fractions - by ichabod801 - Oct-10-2016, 11:09 PM
RE: Sum Series w/ Fractions - by EwH006 - Oct-11-2016, 04:37 PM
RE: Sum Series w/ Fractions - by micseydel - Oct-11-2016, 06:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Periodic Fractions with Fraction or float_to_ratio? TimeMen 3 2,993 May-20-2018, 03:48 PM
Last Post: ljmetzger

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020