Posts

Showing posts with the label program

Syntax of Python

What is Syntax ? Computers are machines that can interpret your instructions only if you type them in the exact format that the computer expects. This expected format - the spelling, formatting and grammar - is called the 'Syntax'. For example : #This function divides two numbers def divide(x,y):                                                            return x/y                                                                                                                                    ...

Simple Hello World Program Tutorial

Image
Now that you know how to use IDLE, lets begin with writing our first program. The Hello World Program ( We usually do this in every language 😎) Lets begin. Fire up IDLE. Go to File>New File. Once it opens up, write the code in the new file. print("Hello World!") Now click on Save As and save the file with .py extension. See the image below. Go to Run> Run Module or Press F5 to check whether the code is working or not. It works.