Python 🔴🔴 | SoloLearn: Learn to code for FREE!

-1

Python 🔴🔴

How to use log in python ??

5/5/2021 3:42:37 PM

Nada Hossam

12 Answers

New Answer

+3

Log to the base is the overloaded function for the regular log method log(1000, 10) is log10(1000) Well, you can make this findings by yourself by exploring the math lib using the dir(), . __doc__ and help() function

+2

Please elaborate your question

+2

Do you mean the logarithm function of two numbers like from math import log log(a) + log(b) or print("log of two numbers")

+2

https://code.sololearn.com/cjyzl60M3YgY/?ref=app

+1

Here I have given the example of one number you can do it for 2 numbers also

+1

But How can I write log x to the base of y ?

+1

Sri Hartatik https://www.sololearn.com/discuss/1316935/?ref=app

+1

import math print(math.log10(1)) #prints o.o print(math.log10(10)#prints 1.0

0

I just want to know how to write a code which outputs the log of two numbers in python 😅

0

Thanks 🌸

0

Mirielle Thanks 🌸🌸

0

Vhfhhcvh hv ftjvvfh