There's also going to be a solver.py, this is where your algorithm will be built.
You can call other things, you can call the languages, but
the submission script needs them to be access through solver.py.
So you either put your implementation natively in Python here, or
call external binaries.
And just as an example,
solver.py will always include a trivial solution that we're providing for you.
So that you can see how the parsing of the files works, how the presentation of
the solution works, and a very trivial way of submitting a solution to the system.
Last but not least they'll be a submit.py which handles running your solver
on a few inputs.
And basically it'll run the solver on your local machine, wrap up the results,
send them off to Coursera over the Internet.
And that'll initiate the grading process.
In most of the assignments you'll have a data directory which
includes the input data for your testing.
But in this particular assignment you don't need any because it so simple.
So, for example, if you were to look at the handout.pdf for Any Integer,
it looks like this.
They all have a similar structure, where you have a problem statement,
description of what the assignment is.
The output format specification and the input format specification and so on.
So you can read this on your own.
Now lat's look inside of solver.py for the Any Integer solution.
By default it has this solve it method.
This is the most important thing, this is the block of code where the algorithm will
go when you're implementing your assignments.
By default it just returns 0
because that's kind of the trivial solution we're providing for you.
If I was a student I need to change this to be what I want it to be.
So my favorite is seven, so
I'm just going to return seven, it's a very beautiful number.
So, now I have set my any integer solution.
How do I test it on my local computer?
Well add the terminal, you use Python and you call it on solver.py.
As you can see the Python file has little main function that we can use for
testing the command line.
In this case it says, this subscript will submit the integer 7,
which is what I expect.
So on my local machine, it looks like everything is working fine.
So if you're happy with this, the next step is to actually try submitting this
solution to the grading system.
So what you're going to do is run python submit.py, and
this is going to bring up an interactive menu that's going to ask
you which parts of the assignment do you want to submit.
And then compute them and then submit them.
In this case, there's only one apart which is to send the integer to the system, so
there's the option of 1 or 0.
And in further assignments, there'll be many more options.
So in my case,
I'm going to hit the number 1 to say I want to just submit this single part.
And what you can see here is it says submitting 7.
That means it read that particular part of the assignment, i ran your algorithm and
it got the result 7.
And it's going to send the result 7 to Coursera.
There might be multiple of these blocks,
depending on how many assignments you submit.
But at the end of getting through all the parts of the assignment,
you will get to a final thing which is called Computations Complete.
This indicates that the local execution on your computer is done.
And now you're going to start trying to send those results to Corsara.
The first thing it'll do is prompt you for your user name,
which is actually an email address.
So, where did these credentials come for submitting the assignments?
Now we're back to the assignment page.
Now, in that how to submit block what you're going to see is a user,
the email that's connected with your Corsara account and
then a special password that is only for this assignment.
You should be careful, these passwords change for each assignment.
So make sure you get the right one.
Copy this information from this page and we go back to the menu.
If I enter those two credentials I have on the page,
you can see put in my user name and my submission token.
Now it's going to say connecting to Coursera, that's actually the point where
it makes the connection over the Internet to Coursera.
And it'll say submitting 1 of 1 parts,
that's because there's one part in this particular assignment.
If you were doing another one, it might say submitting 4 of 6 parts or
something like that.
Now if that Internet request is made successfully,
Coursera is going to give you a response.
In this case, it said your submission has been accepted and will be graded shortly.
That means the response is good, everything is going as planned.