Python Tutorial : Using if


We can select a lot of examples that show you how to use the statement “if” but now we are going to see a simple one. But first I would like to show you how you can how to create a real Python program without
having to use the Python shell.
1. First go to the Python shell and select FILE menu. Then select the option NEW WINDOWS in the FILE menu.
2. Once the new window is open try to save it in any directory. Select SAVE AS in the FILE menu and type “IF_PROGRAM.py”. Don’t forget write the extension *.py because it is the extension that you will use for each program you develop in Python.
3. Then write this code and save it.
4. For run this program you must have to select the RUN menu and choose RUN MODULE or press the F5 key.

You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.