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}')

24th Aug 2021, 8:53 AM
Umar Akorede
Umar Akorede - avatar
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
24th Aug 2021, 10:40 AM
Lothar
Lothar - avatar
0
range for i in range(2, 40): print(i/2)
24th Aug 2021, 9:34 AM
Abs Sh
Abs Sh - avatar