00:01
In this video, we're going to be learning how to calculate the amount of change when a user in terms a number.
00:08
So to get started, we need to create a function.
00:11
So this function is going to call the exact change.
00:17
And within the parentheses, we want to pass a parameter, or have a parameter, which parameter is how we pass information.
00:27
So we are then going to check the user input.
00:45
So if the user enters an input that is greater than zero, we want to then create a variable, call it dollar, and then we're going to divide it.
01:17
And as well it's peak the module of it so user module of 100.
01:28
So this is amount of times you have dollar.
01:41
You're going to return dollar as well as text dollar.
01:57
The dollar is greater than one.
02:02
We're going to return this again but we put in dollars.
02:14
It looks good.
02:16
So now we can come out of this, create a variable to get user input.
02:26
And then we can get that user input to the integer, change.
02:39
And then we're going to print our function, which we can do in here, the user, which is our prouder.
02:52
And now we can run this.
02:56
Say we have $1 .00.
02:59
And see we have one dollar and say you have two dollars because we have more than two i'm sorry more than one okay so let's do the same for quarters so if you consider a quarter it's pretty much the same thing i buy the 25 and then you take the module and then you run the statement so good so fifth quarter i'm gonna change these out numbers and okay that looks good so if we have 25 cents we're gonna take the model of that if we have 10 cents or dime oops i want to put that there.
04:40
Which is pretty much along the same lines.
04:45
Okay, just want to make sure that i'm not under an epstein...