Harsha S You can't get float value of a range because a range creates a number of iterations. How can you get half an iteration? You could assign a float to your code with each iteration IE: lst =  for i in range(5): lst.append(float(input())
For numbers with only one dezimal, create a range from 15 to 105 by step 1. Then divide every number by 10.
Harsha S we are programmers def frange(a, b, c): while a < b: yield a a += c for i in frange(0.1, 10.5, 0.1): print(i)
♤♢☞ 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ☜♢♤ Nice!
Thank you all
Rik Wittkopp what is half an iteration? range(a, b, c) simply means (a, a+b, a+2b, ... upto a+nb < c ). It is a limitation of the range function that it supports only integer values and I believe it's due to floating point approximation.
ａｂｈｉｎａｖ superb 👏 👏
ａｂｈｉｎａｖ a small change: def frange(a,b,c): while a<b: yield float("%.1f"%a) a += c print(list(frange(1.5, 10.5, 0.1)))
This representation gives a range of approximately 3.4E-38 to 3.4E+38 for type float. You can declare variables as float. https://www.tellpopeyes.biz/
Why is my answer only coming out right for one test case even when I use the recommended one
Python palindrome challenge.
help my code does not iterate