Python Introduction
Python is a high-level, interpreted programming language known for its simplicity and readability. It
is widely used for web development, data analysis, automation, artificial intelligence, scientific
computing, and more. Python’s clean syntax makes it easy for beginners to start programming,
while its powerful libraries make it useful for advanced users as well.
Below is a simple example program that takes a number from the user and prints whether it is even
or odd.
# Python Program to check even or odd num = int(input("Enter a number: ")) if num %
2 == 0: print("The number is even") else: print("The number is odd")
How the program works:
1. The program asks the user to enter a number.
2. The input is converted into an integer.
3. Using the modulus operator (%), the program checks whether the number is divisible by 2.
4. If the remainder is 0, it prints 'even'. Otherwise, it prints 'odd'.
Why Python is good for beginners:
- Simple and readable syntax
- Huge community support
- Extensive libraries
- Works on all major operating systems
This concludes your basic 2■page introduction to Python!