Python Forum
Need to use range with decimals
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to use range with decimals
#3
If you want to build the list based on the user providing a min, max, and increment, you don't need to use range:

data = []
current = min_value
while current < max_value:
    data.append(current)
    current += increment
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Need to use range with decimals - by KameronG - Feb-08-2019, 03:15 PM
RE: Need to use range with decimals - by Larz60+ - Feb-08-2019, 04:01 PM
RE: Need to use range with decimals - by ichabod801 - Feb-08-2019, 04:07 PM
RE: Need to use range with decimals - by woooee - Feb-08-2019, 07:14 PM
RE: Need to use range with decimals - by KameronG - Feb-08-2019, 07:31 PM
RE: Need to use range with decimals - by ichabod801 - Feb-08-2019, 07:47 PM
RE: Need to use range with decimals - by KameronG - Feb-08-2019, 07:49 PM
RE: Need to use range with decimals - by ichabod801 - Feb-08-2019, 07:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Limiting Decimals FZMoto 2 3,158 Jul-01-2017, 03:36 AM
Last Post: FZMoto

Forum Jump:

User Panel Messages

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