Python Tutorial

Loading

Download python .exe file from https://www.python.org/ and install it.

After that set the (C:\Users\<username>\AppData\Local\Programs\Python\Python310)  to environment variable PATH

Restart the PC.

Now in command prompt type python.You can see the version of the python.
user exit() to exit from it.Now go to D: from command prompt

create a file hello.py
open it on notepad++
write the below code

print("Hello, World!")

save the file.
Then go to command prompt and navigate to D: where the hello.py exists

type python hello.py

you can see the output in command prompt.

Please download the some code from here
Extract the .zip file and execute one by one.

In python you have to use proper indentation.Like after 'if statement' you have to use TAB same for 'for loop' 'while loop' 'function' etc.
Also if statement , function , loop, class ends with colon(:). In python programming language a colon is used to represent an indented block.


0 0 votes
Article Rating
Subscribe
Notify of

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x