123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computer-Programming >> View Article

Python Unveiled: A Beginner's Odyssey Into The World Of Coding Magic

Profile Picture
By Author: Priyanka
Total Articles: 14
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

Installation:
1:Visit the official Python website: https://www.python.org/downloads/windows/
2.Click the appropriate link for your system to download the executable file: Windows installer (64-bit) or Windows installer (32-bit).
3.Run that downloaded executable installer file. For example python.exe file.
4.Click Install to start the installation.
5.After the installation is complete, a Setup was successful message displays.
6.To verify python installation:
• Enter the code : python --version
7.Now you are ready to start learning and programming in Python.
Quick Summary:
Python has syntax that allows developers to write programs with less lines than some other programming languages. Python runs on an interpreter system.Python is a computer programming language often used to build websites and software, applications ,conduct data analysis.
Targeted Audience:
This article is intended for those people interested in learning the fundamentals of python development. It will be useful for freshers, backend developers, students. and for those who are lazy ...
... to write lengthy code because python has easy, simple syntax which includes short code.
Use Cases:
• Web development -framework :Django, Flask, fastapi,etc.
• Data analysis -Pandas, NumPy
• Game development -Pygame
• Education and teaching programming concepts
Lets see what Python is:
Definition:
• Python is a high-level, general-purpose, interpreted object-oriented programming language and it is used to build websites and software.
• Python code tends to be short and when compared to compiled languages like C and C++, it executes programs slower.
Features:
1. Easy to Learn and Use:
• Python is easy to learn and simple as compared to other languages. Its syntax is straightforward.
• There is no use of the semicolon or curly-bracket in synatx.
• It is the most suggested programming language for beginners.
2. Interpreted Language:
• Interpreted means program executes single line at a time.
• The advantage of being interpreted language, makes it debugging easy and portable.
3. Expressive Language:
• For Ex: If you want to print small program you simply type print("Hello World"). It will take only single line to execute, while Java or C takes multiple lines.
4. Free and Open Source:
• Python is freely available for everyone. open-source means, "Anyone can download its source code without paying a single rupee.
5. Object-Oriented Language:
• Python supports object-oriented language and concepts of classes and objects. It supports inheritance, polymorphism, and encapsulation, etc.
Syntax:
print("Hello, World!") //It Will Print Hello World
How to run python file:
python myfile.py // here my myfile is name of program.
Python Comments:
• Comments are often used to explain Python code. "#" used for commenting.
• For Ex: # hello
Variables:
• Variables are like containers it stores data values.
• For Ex: a = 5 //a is a variable
Data Types:
1. String: In String datatype we can store string values. For Ex:- x = "Hello World"
2. int: In int datatype we can store int values. For Ex:- x = 20
3. float: In float datatype we can store float values. For Ex:- x = 2.5
4. list: lists are always stored in square brackets [ ] . For Ex:- x = ["cat", "dog", "rat"]
5. tuple: tuples are always stored in round brackets ( ) . For Ex :- x = ("cat", "dog", "rat")
6. dict: In Dictionaries we store key value pair. For Ex: x = {"name" : "ram", "age" : 20}
Function:
• A function is a reusable block of code that performs some specific tasks. it only runs when it is called.
• You can pass data, known as parameters in a function.
• For ex:
def function_name(parameters):
Arrays:
• Arrays are used to store multiple values but with same datatype.
• For Ex: animal=["cat", "dog", "rat"] //animal is variable
• To check length of an array :x = len(animals) //len is function to calculate length
• To add elements in array we use append method. For Ex:animal.append("fox")
• To delete elements in array we use pop method.For Ex:animal.pop(1)
• Removes all the elements from the list. Method:- clear()
• Returns a copy of the list. Method :- copy()
• Returns the number of elements with the specific value. Method :-count()
• Add elements of a list to the end of the current list. Method:- extend()
• Adds an element at the specified position.Method:- insert()
• Removes the first item with the given value. Method :- remove()
• Reverses the order of the list. Method :- reverse()
• Sorts the list. Method:- sort()
Class :
• Class is a blueprint of an object.
• It defines the structure and behavior of objects of that class.
• The class keyword is used to define a class.
Object:
• An object is an instance of a class and a collection of attributes and methods.
• For ex:- p1 = Person("raj", 20)
Inheritance:
• Inheritance is a OOP concept that allows you to create a new class based on an existing class. The new class inherits attributes and methods from the existing class, which is referred to as the base or parent class. The newer class is called the derived or child class of the base class.
Polymorphism:
• polymorphism means having many form.
1)Method Overloading (Compile-Time Polymorphism):
• having same name but different parameters.
2)Method Overriding (Run-Time Polymorphism):
• having same name and same parameters.
Encapsulation:
• simple lang. wrapping or hidding of data.
• object has ability to hide data and behaviour that is not neccessary to use.
How to take User Input: For Ex
username = input("Enter username:")
print("Username is: " + username)
Closing Thought:
Python is a powerful and versatile programming language that has become an integral part of the technology . Everyone is using python because of its simple syntax, and if you are beginner you should definetely go with python.

Credit – Priyanka Divekar

MetricsViews Pvt. Ltd.
MetricsViews specializes in building a solid DevOps strategy with cloud-native including AWS, GCP, Azure, Salesforce, and many more. We excel in microservice adoption, CI/CD, Orchestration, and Provisioning of Infrastructure - with Smart DevOps tools like Terraform, and CloudFormation on the cloud.
www.metricsviews.com.

Total Views: 104Word Count: 954See All articles From Author

Add Comment

Computer Programming Articles

1. Which Institute Is Best For Coding And Programming In Bhopal?
Author: Shankar Singh

2. Top 9 Benefits Of Custom Mobile Application Development
Author: Byteahead

3. Top 10 Creative Business Ideas For Entrepreneurs
Author: Byteahead

4. Top 10 Apps Like Tiktok Everyone Should Check Out
Author: Byteahead

5. Is The Apple Watch Series 7 Worth It For Seniors?
Author: Ashish

6. The Ultimate Guide To Ebay Product Listing Services: Elevate Your Online Store
Author: rachelvandereg

7. Which Are The Best Java Coding Classes In Bhopal?
Author: Shankar Singh

8. Warehouse Management In Zambia: Essential Features To Look For
Author: Doris Rose

9. Ecommerce Web Design And Development In Melbourne With The Merchant Buddy
Author: themerchantbuddy

10. Why Website Maintenance Is Crucial For Business Success
Author: Yogendra Shinde

11. Boost Your Business With Smart Invoice Pos Software In Zambia
Author: Cecilia Robert

12. How Stablecoin Development Ensures Stability And Security?
Author: Michael noah

13. Công Cụ Tính Chiều Cao Chuẩn Từ Minbin Tool: Đo Lường Và Cải Thiện Chiều Cao Hiệu Quả
Author: KenJi123

14. How To Make A Courier App For Courier Delivery And Tracking Service
Author: Deorwine Infotech

15. Reputation Management In The Digital Age: Protecting And Enhancing Your Law Firm’s Image
Author: jamewilliams

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: