Writing your first code in Python

Writing your first code in Python

Writing your first code in Python

Today we are going to see about Writing your first code in Python

In case if you have missed our previous topics

  1. Python introduction in Tamil Part 1
  2. Python introduction in Tamil Part 2

Watch in youtube: https://youtu.be/Mj6HSMLvikc

Learn Python in Tamil | பைதான் மொழியைக் கற்றுக்கொள்ளுங்கள் – Writing first program in Python and executing them using Python Interpreter

Writing your first Python code

Where to write?

You can use any Notepad or Text editor for writing your Python program. But there are May IDEs available to help us with auto fill the code snippet or help us with formatting the code and check for any syntax errors.

But today we are going to write our first code, So lets use simple notepad or text editor.

Your first Python program

# This is my first Python code
# To print Hello world in the console
print("Hello World")

Save the above file in any folder with the name helloworld.py

.py is the file extension used to identify the file is Python script


Well you have now officially a Python developer, because you have written your first python code.

How to execute the Python program?

In order to execute the python program, we need Python Interpreter which will do the magic.

What is that magic?

Its the Interpretation of simple English into 0’s and 1’s, Yes the Python Interpreter is going to read your code and convert into 0’s and 1’s so that machine can understand the instructions.

To execute the Python code,
  1. You need to open Terminal or Command prompt in your Machine.
  2. Type “python3 filename.py” (In our case, “python3 helloworld.py”
  3. Hit Enter, you should see the output in the console.

Got into issue while running the program?

Goto this link https://youtu.be/Mj6HSMLvikc and comment the error message. We will have a loot at what went wrong and why the error appeared.
Writing your first code in Python, Print Hello world using python, Python interpreter how to run puthon script, how to run python file, how to save python script
Python intro in Tamil – Part 2 | பைதான் கற்றுக்கொள்ளுங்கள்

Python intro in Tamil – Part 2 | பைதான் கற்றுக்கொள்ளுங்கள்

Python intro in Tamil – Part 2

In today’s topic we will be seeing the Python intro in Tamil – Part 2 | பைதான் கற்றுக்கொள்ளுங்கள், before proceeding if you have missed watching our previous topic “Python intro in Tamil – part 1” see below link.

Watch Python introduction in Tamil Part 1

What we are going to see?

In Python intro in Tamil – Part 2, We are going to see how to Download and install Python. along with that we will see the operating system supported and system minimum requirements.

Learn Python in Tamil | பைதான் மொழியைக் கற்றுக்கொள்ளுங்கள் – Python programming language introduction | பைத்தான் அறிமுகம்

Youtube:https://youtu.be/GJ_4VVX21QA

What is needed to setup and run python?

Supported OS

  • Microsoft Windows
  • Linux / Unix
  • Mac OS

Minimum system requirements

  • x86 – 64 bit Intel or AMD Processor
  • Min. 4 GB RAM or greater
  • Min. 5 GB Hard disk space or more

How and where to download and install Python?

To Download & Install

In Windows
  1. Visit https://www.python.org/download/ and download the setup file.
  2. Run the exe (Winodws) and ensure you set the Python Home path.
In Linux

Open Terminal and run the below command, (Ubuntu, Pop OS)

Note: Ensure you have root access, else below command will throw error.

$>sudo apt-get install python3

After executed with root privilege, it will display list of modules or library its going add to your system.

And will display the disk space its going to occupy after installing.

Press “Y” to proceed and installation will finish in some time.

(Note: You need to be connected to internet for downloading python from Linux terminal)

How to check Python installation is completed and what is the python version?

Once installation is completed, Run the following commands to verify the installation is success and the Python is installed correctly.

$>python3 --version

will display the version installed, this command can be run in Windows, Linux & Max OS.

or

$> whereis python3

will show the python3 system paths

or

$>which python3

will show the home path of the python3.

Learn Python programming | Beginner to Expert  | Python introduction, System requirements,  Python  Download and Installing Python.
Python intro in Tamil – Part 2 | பைதான் கற்றுக்கொள்ளுங்கள்

Python introduction in Tamil | பைதான் கற்றுக்கொள்ளுங்கள்

Python introduction in Tamil | பைதான் கற்றுக்கொள்ளுங்கள்

Python introduction in Tamil | பைதான் கற்றுக்கொள்ளுங்கள் Watch in youtube: https://youtu.be/HphhG-VVs

Learn Python in Tamil | பைதான் மொழியைக் கற்றுக்கொள்ளுங்கள் – Python programming language introduction | பைத்தான் அறிமுகம்

ணினி, மொபைல், இயந்திரங்கள் மின்னணு சாதனங்கள்,
அது எந்த மனிதனின் மொழியையும் புரிந்து கொள்ளவில்லை.
அது என்ன புரிந்துகொள்கிறது? இது இயந்திர மொழியைப் புரிந்து கொள்ள முடியும் (இது 0 மற்றும் 1 இன் தவிர வேறு ஒன்றும் இல்லை – binary code)

High level & Low level மொழிகள்

High level மொழிகள்- எளிய ஆங்கில வாக்கியம் இயந்திரத்திற்கு வழிமுறைகளை வழங்க பயன்படுத்தப்படுகிறது.
Low level மொழிகளின் எடுத்துக்காட்டு #Java, #Python மற்றும் பல
Low level 0 மற்றும் 1 கள் செயல் அல்லது வழிமுறைகளைச் செய்ய இயந்திரத்தில் ஊட்டப்படுகின்றன. (Assembly மொழி மற்றும் Machine மொழிகள்)

High level to low level or machine language “Interpreter” பயன்படுத்தப்படுகிறது.
எளிய ஆங்கிலத்தை 0 மற்றும் 1 க்கு மாற்ற டெவலப்பர்கள் அல்லது புரோகிராமர்களால் இந்த interpreter எழுதினார்.

பைதான் “குடியோ வான் ரோஸம்” என்பவரால் உருவாக்கப்பட்டது மற்றும் 1991 ஆம் ஆண்டில் வெளியிடப்பட்டது.
வலை வடிவமைப்பு, மென்பொருள் மேம்பாடு, கணினி ஸ்கிரிப்டிங், கணிதம் மற்றும் பல இடங்களில் பைதான் பயன்படுத்தப்படுகிறது.


Computer, mobile, machines are electronic devices,
it does not understand any human’s language.

Then what does computer’s understands?

Computer’s can understand only machine language, which is nothing but 0’s and 1’s – Binary code

High level or Low level programming languages

High level – It’s simple English sentence which are used for providing instructions to the machines.

Example: #Java, #Python are some of High level programming languages.


Low level – Direct 0’s and 1’s are feed into the machine to perform the action or instructions. (Assembly language and machine languages)

Interpreter

It is used for converting the High level to Low level or machine,
Interpreter’s were also written by developers or programmers, to convert the simple English sentence to 0’s and 1’s.

Gudio van Rossum has created Python and released in the year 1991.
It is also used in Web designing, Software development, System scripting, Mathematics and many more places.

Python introduction in Tamil | Pythin Beginner to Expert | Video tutorial | What is programming language? | What is python | Who created python? | Where is it used? | Web Designing | Scripting | Automation | Machine Learning

Searching a text in a file using grep

Here we’re going to searching a text in a file using grep?

Searching a text in a file using grep, this command will be very much handy when searching in multiple files or folders in unix terminal.

grep is one of the powerful command used for searching in files or folder with the search pattern.

Searching for text in file using grep

Lets see how to search for text or string in files or folders using grep command

Command Usage:
grep [options] "search pattern"[regex] [filename/foldername]
Note: use double quotes for your search string

Options : (Below are frequently used options with grep command)
-i Ignores case
-n Print the line number
-c Count of matched pattern (Will not print the search line, rather it just prints the count)
-r Will search folders for matching text.
-v non-matched lines are printed

Try for yourself:

1) Search for any string and print count
hint: use -c
2) Search entire folder for match pattern with , (This is special symbol)
hint: “\,”
3) Search string by ignoring the case and also search for multiple string in a file
hint: use -v and in search string you need to split using | for multiple search string.

Try for yourself and comment it here https://youtu.be/9pUPUEvJop8

practice to keep FAMILIAR with the commands.

Subscribe to our channel for more videos : https://bit.ly/aryanz-youtube

https://youtu.be/9pUPUEvJop8
Searching a text in a file using grep
~3Minutes: Tutorial

All about Permissions (CHOWN) in Unix – 3Minutes: Tutorial

Here we’re going to talk all about Permissions (CHOWN) in Unix?

When it comes to access for reading,writing or executing files in unix we need to play around with the permissions! So today we are going to talk all about ownership and permissions (chown).

Ownership and Permissions are important thing in unix, when it comes to files and folders access.

Changing ownership of files and folders using chown in unix - ~3Minutes:... youtu.be/Q3Mm4Lzeiyk via @YouTube #3MinTut #3MinutesTutorial #ShortTechTalk #LearningShort #unix #chown permissions and security #aryanz_co_in #balamtin #blog

Changing ownership for files and folders using CHOWN

Command Usage:
chown user:group filename (Changing ownership for user and group)
chown :group filename (Only to the group)
chown user filename (Only the user)
chown user:group foldername -R (For folders and sub directory use -R)
Note: -R to apply the changes to the sub directories and files within the folder.

owner – User who created the file or folder
group – User belong to the group
(groups example: admin, author, sysadmin, root, local, itadmin) – varies from system to system

Try for yourself:
1) Change both owner and group from root to user1 or user1 to root
hint: chown root:root file1.txt
2) Try to change for folder and its sub content (incl. sub directories)
chown root:aryanz_co_in folder1 -R

Try for yourself and comment it here https://youtu.be/Q3Mm4Lzeiyk

practice to keep FAMILIAR with the commands.

Subscribe to our channel for more videos : https://bit.ly/aryanz-youtube

https://youtu.be/Q3Mm4Lzeiyk
Changing ownership of files and folders using chown in unix - ~3Minutes:... youtu.be/Q3Mm4Lzeiyk via @YouTube #3MinTut #3MinutesTutorial #ShortTechTalk #LearningShort #unix #chown permissions and security #aryanz_co_in #balamtin #blog
~3Minutes: Tutorial

Please disable your adblocker or whitelist this site! We Provide Free content and in return, all we ask is to allow serving Ads.

Pin It on Pinterest