00:01
Okay, so we're given the following problem input.
00:05
So basically we need to think about this higher -lower game in terms of pseudocode and then i believe writing a python script might also be useful.
00:19
So basically just thinking aloud to quickly go over the first part, different steps needed in this program are to do things like take in inputs, compare these inputs to each other, check inputs against the lower and upper bounds that are inputs, and then also keep on looping things.
00:41
And so basically you can break down each of these into various statements and steps that a computer can understand by using if -else statements, for instance.
00:50
So using if -else statements might be good for checking values and then loops might be good to making sure that we're generating repeated, if we need to repeatedly evaluate lines of code until maybe some condition is reached.
01:08
So some pseudocode that logically outlines each step and this will be roughly python.
01:13
So yeah, hopefully this will be similar enough to python if you need to write it later.
01:20
So basically we'll want to figure out an upper bound and a lower bound.
01:25
So what we can do is first ask for lower bound, lower bound equals something like input enter lower bound and let's just convert that to an int and then upper bound equals another int conversion of input enter upper bound.
02:00
And then so we need to have some info validation here so we can use an assert statement.
02:05
So assert lower bound is less than this upper bound.
02:11
Nice.
02:12
If that's not true, then that's going to error.
02:15
And now we need to generate a random number.
02:17
So i believe if you were to run import random, then we can say the goal is equal to random dot rand int between the lower bound and the upper bound.
02:45
And then if these bounds are inclusive, if these bounds are exclusive, you might need a plus one and a minus one here.
02:52
But that's a minor detail.
02:56
Okay.
02:56
So this generates a random number and then now we need to get the user to guess...