Tutor profile: Jordan M.
Subject: Python Programming
Write a function to check if a string is a palindrome.
def palindromeTest(word): for i in range(0, int(len(word)/2)): if word[i] != word[len(word) - i - 1]: return false return true
What is the volume of a cuboid whose length is twice its height less 4 and whose height is a third of its width if its width is 24?
The area is length*width*height. We know that width=24. We can solve for height: h=w/3=24/3=8. We can solve for length: l=2h-4=16-4=12. So the area = 24*8*12 = 2,304 units cubed.
How do you multiply two binomials?
Use the FOIL method: First, Outside, Inside, Last. For example, (x+2)*(2x+3) would be First: x*2x=2x^2, Outside: x*3=3x, Inside: 2*2x=4x, Last: 2*3=6. Then sum them: 2x^2 + 3x + 4x + 6. Lastly, combine like terms: 2x^2 + 7x + 6
needs and Jordan will reply soon.