Python Course

Course Fee : ₹1199.0

Welcome to the Python Basics Course

Python is a versatile, high-level programming language that is easy to learn and widely used for web development, data analysis, artificial intelligence, and more!

Topics Covered

  • Basic Syntax: Writing Python code.
  • Data Types: Strings, integers, floats, lists, dictionaries, etc.
  • Control Structures: Loops and conditional statements.
  • Functions: Modularizing code into reusable blocks.
  • Modules and Libraries: Extending Python's functionality.

Basic Syntax

A simple Python program:


      # Hello World Program
      print("Hello, World!")
          

Data Types

Examples of different data types:


      # Integer
      x = 10
      
      # Float
      y = 3.14
      
      # String
      name = "Python"
      
      # List
      fruits = ["apple", "banana", "cherry"]
      
      # Dictionary
      person = {"name": "Alice", "age": 25}
          

Control Structures

Conditional statements and loops:


      # If-else statement
      if x > 5:
          print("x is greater than 5")
      else:
          print("x is less than or equal to 5")
      
      # For loop
      for fruit in fruits:
          print(fruit)
      
      # While loop
      count = 0
      while count < 5:
          print(count)
          count += 1
          

Functions

Defining and calling functions:


      # Function definition
      def greet(name):
          return f"Hello, {name}!"
      
      # Function call
      print(greet("Alice"))
          

Modules and Libraries

Using libraries in Python:


      # Importing a module
      import math
      
      # Using a function from the module
      result = math.sqrt(16)
      print(result)