challenge 1: i dont understand what they mean : "If
base raised to the
exponent is greater than
can someone please advise?
Take two to the power four, 2^4 which is equivalent to two mulitplied by itself four times, 2 * 2 * 2 * 2. In this case 2 is the base and 4 is the exponent. This would be equal to 16 and therefore less than 5000. You’re looking to do something when the output is above 5000.
Edit: Just noticed Python in the title so it’d be 2**4.
thanks for the reply.
Im confused as to how you understood that its ‘2 is the base and 4 is the exponent’.
the only figure supplied was 5000. or im i just not getting this bit?
thanks in advance.
Hello @ruby9015221395 and welcome to the forums
In this case they are not asking you to pay attention to what the base and exponent are, just what their answer is.
if gate is only checking if the answer is more than 5000.
You could see this same principle with adding.
This code will return
if 7 + 5 > 20: return True else: return False
However if you change the numbers, this code will return
if 10 + 12 > 20: return True else: return False
They want you to understand how to use the if gate for a variety of numbers.
I understand this better now.