scottsss2468931

@scottsss2468931@kbin.social
scottsss2468931,

I did two, two week stents while living out of a hotel....I will never do it again if I have to do it out of a hotel. But 6pm to 2 am etc out of my own place I'd consider.

It's just hard at first forcing yourself to sleep. Blackout curtains help. Or a sleep mask.

scottsss2468931, to python

I'm learning python and starting learning list comprehension. I though I would create a quick list from 1 to 50 in .1 increments to test logic etc and notice when I run the program the output is as shown below. My question is why am I not just getting .3. Which would be the next number in the sequence

To get the output I want would I have to use a rounding function? Or limit the value to one place.

Thanks

[0, 0.1, 0.2, 0.30000000000000004, 0.4, 0.5, 0.6, 0.7, 0.7999999999999999, 0.8999999999999999, 0.9999999999999999, 1.0999999999999999, 1.2, 1.3, 1.4000000000000001, 1.5000000000000002, 1.6000000000000003, 1.7000000000000004, 1.8000000000000005, 1.9000000000000006, 2.0000000000000004, 2.100000000000000

count = 0
a = []
while count < 50.1:
a.append(count)
count = count + .1
print(a)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • khanakhh
  • kavyap
  • thenastyranch
  • everett
  • tacticalgear
  • rosin
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • InstantRegret
  • Youngstown
  • slotface
  • anitta
  • ethstaker
  • ngwrru68w68
  • cisconetworking
  • modclub
  • normalnudes
  • osvaldo12
  • cubers
  • GTA5RPClips
  • Leos
  • tester
  • megavids
  • provamag3
  • lostlight
  • All magazines