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
#5
Ok,so now I have this:

if ran == "range":
    i = float(input("What is the minimum z value?"))
    k = float(input("What is the maximum z value?"))
    u = float(input("By what increment?"))
    data = []
    current = i
    while i < k:
        data.append(i)
        current += u
But after asking for the min, max and increment, nothing happens. I'm guessing I need something in the brackets after data, but I'm not sure what would go there.
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,224 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