0
If there's no numpy module on pydroid 3 app how do i do a range (1, 20, 0.5)
import math p1 = 1 p2 = int(input("Enter possible value of P2: ")) b = p2/p1 db = 10 * math.log10(b) print(db) import numpy as np for j in np.arange(1, 20, 0.5): print (f'j{db}')
2 ответов
+ 3
(Abs Sh ,
the code you presented does only create values up to 19.5 ...)
Umar Akorede ,
you can generate values as demanded by using a small while loop:
https://code.sololearn.com/c2tlJS36q48Y/?ref=app
0
range
for i in range(2, 40):
print(i/2)