A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 4 years ago

In PS1 Problem 2 I am having trouble using log in python. I entered from math import * at the top of my code then i only have print log(2) for the rest. It is giving me the number 0.69314718056 which i believe to be incorrect. I believe the correct answer to be 0.301029996. Why am I not getting this answer?

  • This Question is Closed
  1. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    tl;dr Python is telling me the log of 2 is 0.69314718056

  2. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    My calculator says the log of 2 is 0.301029996

  3. lucifer
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    no, it's correct. log means log base e unless you specify. 0.30... is for base 10!

  4. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ty for your reply

  5. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    the docs are your friend F1 from IDLE in windows http://docs.python.org/library/math.html#math.log

  6. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.