Simple Python Program to Print Hello world
# Program Python Hello World. print("Hello world")
Print Hello World in Python using function
def hello(): print("Hello world") def helloname(str): print("Hello",str) hello(); str=input("Enter Your Name:") helloname(str);
Enter Your Name: Sid
Video explanation for Hello World program in Python
It is a basic python program for beginners. print() is an in-built python function to print any strings, numbers, and characters on screen. You can also perform arithmetic operations using the print() function. But, you have to take care of one thing i.e., You should not use Quotations to perform arithmetic operations. let me take an example for this:
- print("5+3") Output: 5+3
- print(5+3) Output: 8
How to run Hello World Program in Python
- You have to install python IDE and compiler.
- After installing, search for python on your computer. click on Python(3.9).
- Just type, your code and press enter. The output will display on the new line.
How to run Python program in windows 10
- Download and install Sublime Text.
- Open Sublime Text and write your code in it.
- Press Ctrl + s, the file name should have extension .py. For example helloworld.py
- Open the folder, where you save it. Press shift and right-click and click on the open PowerShell window here.
- Enter python Your-program-name.py like python helloworld.py
Free Python Course from DataCamp
- They have 6 courses that are completely free:
- All of their other courses are free to start (e.g., you can do the first chapter of any other course on our site for free.) You can see all of thier courses here.
- All of their course materials are free for educators to use in their own training. Educators can sign up here to access free course materials for their classrooms.