Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
halkazi
Group Title
I am getting an exact difference of 1, in my answer while I am using the ceiling function. Here's the code:
import math
a=0
b=0
c=0
def mult_add(a,b,c):
z = a*b+c
return z
>>> mult_add(math.log(12,7), 2, math.ceil(276/19))
16.55397881653925
I should be getting:
17.5539788165
 one year ago
 one year ago
halkazi Group Title
I am getting an exact difference of 1, in my answer while I am using the ceiling function. Here's the code: import math a=0 b=0 c=0 def mult_add(a,b,c): z = a*b+c return z >>> mult_add(math.log(12,7), 2, math.ceil(276/19)) 16.55397881653925 I should be getting: 17.5539788165
 one year ago
 one year ago

This Question is Closed

rsmith6559 Group TitleBest ResponseYou've already chosen the best response.3
try typing directly into the interpreter: 276 / 19 and 276 / 19.0 Then run them both with math.ceil() Python does integer division by default.
 one year ago

halkazi Group TitleBest ResponseYou've already chosen the best response.0
Thanks. That explains it.
 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.