Need help with homework (binary, induction, calculator, python)
Hi. I have 4 exercises I need help with. Language is Norwegian, so I'll try to rewrite some of it in English.
-
Write in binary (two's complement). I know no binary. I'd like to see a and b done, method and all. With that I should be able to do the last 3. Feel free to do all 5 and maybe post the answer to the final 5.
-
Don't like Reddit formatting, not gonna repeat the formula: Show, by using induction, that 0 <= Xn <= 1 for all natural numbers n >= 2. Not the most important one here. Any help, from just the very beginning, to the whole thing, would be great. Long time since I've done this, so I'd like to just see the start to jolt my memory.
-
Solve quadratic formulas on a computer a) Write the program: My solution b) Use the program to calculate 1e-8 x^2 + 10x + 1e-8. (My answer: the values of x are -1000000000.0 and 0.0) You will see that one of the answers have a shit value. Which one is that, and why did it happen. Suggest a different formula to prevent this. Have a bit trouble with the last part.
-
This goes a bit in python and a bit in math. You can choose to ignore the whole thing, if you like. a) Explain what the program does and what what's printed tells us. b)Change the program so that it in stead compares the two sizes x + ( y + z) and (x + y) + z and run it again. You know see that the first number written out is smaller than last time (50.64). Why is that? Completely lost on this one, but I do not know "random" in python, and I've only put in 5 minutes of work on that one.
EDIT1: Think I might get 1a) I'm thinking d=13 which gives 1101, a=10, so 1010, and 7 is 0111
I add it together and get 110110100111. Still unsure about the small 16. Think it means that I have 4 digits for every number, but that's just a guess.
Posted Sep 16, 2015, 6:51 AM UTC · edited