- 1

Good day everyone.How do you calculate logarithm in a way that it will accept string, if it is possible, please send solutions

Python questions

3rd Feb 2021, 5:07 PM
Quadri Lasisi
Quadri Lasisi - avatar
5 Réponses
0
First share your code which you have tried
3rd Feb 2021, 5:17 PM
Atul [Inactive]
0
Ok Atul
3rd Feb 2021, 5:18 PM
Quadri Lasisi
Quadri Lasisi - avatar
0
I used math log () function. I used numpy function But nothing worked, they need real numbers not string/str
3rd Feb 2021, 5:31 PM
Quadri Lasisi
Quadri Lasisi - avatar
0
You have to cast the string to float first: num = float(num_string) Then do calculations with num
3rd Feb 2021, 7:29 PM
Benjamin Jürgens
Benjamin Jürgens - avatar
0
Ok Benjamin Jürgens. I will try it
4th Feb 2021, 5:39 PM
Quadri Lasisi
Quadri Lasisi - avatar