The function doesn’t work, python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

The function doesn’t work, python

import math def optimal_size( n =258200, p=0.01): m= -(n * math.log(p) / (math.log(2)**2) return int(m)

12th Apr 2020, 1:26 PM
Katja
Katja - avatar
3 Answers
+ 2
Use some more brackets , between the the division sign and also before - sign
12th Apr 2020, 1:29 PM
Raj Kalash Tiwari
Raj Kalash Tiwari - avatar
+ 2
Raj Kalash Tiwari oh, thanks 👍
12th Apr 2020, 1:33 PM
Katja
Katja - avatar
+ 2
Yup your welcome
12th Apr 2020, 1:34 PM
Raj Kalash Tiwari
Raj Kalash Tiwari - avatar