+ 1
Why it doesn't run on phyton?
x = float(input("Inserire numero di partenza: ")) y = float(input("Inserire numero di arrivo: ")) y += 1 z = float(input("Inserire distanza tra i numeri: ")) number = list(range(x, y, z)) print(number)
5 Respuestas
+ 1
ok thanks, how Can I make It run with floats?
+ 1
Your floats are not lined up correctly.
+ 1
ok thank you, I'm trying it
0
You use floats. I think "range" expects integers.
0
This works at Sololearn:
import numpy as np
x = float(input("Inserire numero di partenza: "))
y = float(input("Inserire numero di arrivo: "))
y += 1
z = float(input("Inserire distanza tra i numeri: "))
number = list(np.arange(x, y, z))
print(number)
I am not sure it is what you want. And it needs numpy. It is not in the standard python installation.