In IDLE: Ctrl-s Saves the .py file, then F5 runs the program (if there are no syntax errors in it).

Some notes on grading:

The major part of the grade/score you receive for the homeworks is for a correctly working program; that does everything required of it as specified in the assignment, that does so without error. You need to thoroughly test the program to make sure all possible logical paths thru the code work correctly.

A program must also look good: