It's UWAweek 17 (1st semester, week 8)

help2005

This forum is provided to promote discussion amongst students enrolled in CITS2005 Object Oriented Programming.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 79 articles.
Currently 1 other person reading this forum.


 UWA week 12 (1st semester, week 4) ↓
SVG not supported

Login to reply

👍?
helpful
5:14pm Tue 19th Mar, Emily W.

Hello! So, for lab 3 exercise 1, I wanted to add user attempts based on their input range, as I have previously done this as a python exercise. With python it's a bit simpler, like so: min_num_guesses = round(math.log2(B - A + 1)). I have had a look and found that with java.lang.math, it only uses base 10 or e. I know that to change the base to 2 it would just be to divide log(x) by log(2) but I can't quite figure out how to implement this?

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy