Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
susanjrobertson
Group Title
I'm having trouble on the 2.3 Math Module exercise. Maybe it's because I'm not great at math, but I have no idea what the angle_test or ceiling_test functions should look like. Any help?
 one year ago
 one year ago
susanjrobertson Group Title
I'm having trouble on the 2.3 Math Module exercise. Maybe it's because I'm not great at math, but I have no idea what the angle_test or ceiling_test functions should look like. Any help?
 one year ago
 one year ago

This Question is Closed

Screech Group TitleBest ResponseYou've already chosen the best response.0
Just took a quick look at problem statement. angle_test and ceiling_test are not functions. They are just variables being assigned values. Looks like part 2 is only there to get some practice using the functions imported with the math module. The only one that should give you pause is the base 7 log. Normally, we think in terms of base 10 log or base e log. But the documents for the log function describes how to specify the base (default base is e, the natural log function).
 one year ago

exchaoordo Group TitleBest ResponseYou've already chosen the best response.0
I'm struggling with this too because I don't understand the instruction for 2.3 part 2:"Underneath your function definition, computer the following values using multadd and print out the result." I'm just not sure what's being asked for. You can get the output they want with this statement, but it doesn't use your multadd function: print "sin(pi/4) + cos(pi/4)/2 is: ", (math.sin(math.pi/4)+ math.cos(math.pi/4)/2)
 one year ago

Screech Group TitleBest ResponseYou've already chosen the best response.0
You can use your multadd function. It looks rather contrived, though. I guess you could try it without using multadd and then repeat it forcing the use of multadd. angle_test = multadd( 0.5, cos(...), sin(...) and similarly ceiling_test = multadd( 2.0, log(...), ceil(...)) I, personally, don't see much value in using multadd here, but I'll go through the exercise just to confirm that my multadd function produces the correct result.
 one year ago

exchaoordo Group TitleBest ResponseYou've already chosen the best response.0
Okay, so I get: angle_test= multadd(math.sin(math.pi/4), 0.5, math.sin(math.pi/4)) print "sin(pi/4) + cos(pi/4)/2 is: \n", angle_test Seems a long way to go. I guess I was overthinking it, thanks. Oddly the ceiling function comes out at 16.55etc rather than 17.55etc. as in their example.
 one year ago

susanjrobertson Group TitleBest ResponseYou've already chosen the best response.0
Thanks, I've gotten the angle_test one to work, just trying to get syntax correct for the ceiling_test, but I'm getting there.
 one year ago

susanjrobertson Group TitleBest ResponseYou've already chosen the best response.0
So my answer isn't right, but it's at least working. I understand the concepts so I'm moving on :)
 one year ago

samoos Group TitleBest ResponseYou've already chosen the best response.0
exchaoordo, I had the same result  16.55... instead of 17.55... I realised that being exactly 1.0 off the right answer must have had something to do with the ceiling function rounding up, combined with the truncation that happens when you divide with integers rather than floats. Changing one of my integers (19) to a float (19.0) gave me the correct answer: print multadd(math.log(12,7), 2.0, math.ceil(276/19)) >>>16.5539788165 print multadd(math.log(12,7), 2.0, math.ceil(276/19.0)) >>>17.5539788165
 one year ago
See more questions >>>
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
 Engagement 19 Mad Hatter
 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.