Write a program that first imports the math standard library. The program then defines a function called log_e that has one parameter called power_of_e. In the function, pass the parameter to the log function of the math module and assign the returned value to a variable called exponent. The last statement in the function should return exponent.
After the function and outside the function, write a statement to read a number from the keyboard, convert it to float and assign it to a variable called my_number. Next, write a print statement that has enclosed in the print parenthesis a call to log_e passing my_number to log_e. The output should be to three decimal places using format() function.
An example of running your program is as follows:
Enter a number and I will give you it's natural logarithm: 5
1.609
1
Expert's answer
2018-10-17T02:32:35-0400
Dear brad, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Comments
Leave a comment