Skip to content

Learn Python

  • Python
  • Cyber Security Basics
Learn Python
  • Nested for loops, break, continue, and pass in for loops
    Python

    Nested for loops, break, continue, and pass in for loops

    Byadmin July 19, 2025July 22, 2025

    break, continue, and pass in for loops with simple examples. These statements allow you to control the flow of execution within a loop. 1. break Statement The break statement is used to terminate the loop entirely. When break is encountered, the loop immediately stops, and execution continues with the statement immediately following the loop. Example:…

    Read More Nested for loops, break, continue, and pass in for loopsContinue

  • For loop Programs 15th Class
    Python

    For loop Programs 15th Class

    Byadmin July 17, 2025July 17, 2025

    Β Sum of the firstΒ nΒ natural numbersΒ  n = int(input(“Enter a positive integer: “)) sum = 0 for i in range(1, n + 1): sum += i print(f”The sum of the first {n} numbers is: {sum}”) Explanation: Example: If the user inputs 5, the program calculates: text 1 + 2 + 3 + 4 + 5 = 15…

    Read More For loop Programs 15th ClassContinue

  • For loop 13 and 14th class
    Python

    For loop 13 and 14th class

    Byadmin July 12, 2025July 16, 2025

    The range() Function in Python The range() function is a built-in Python function that generates a sequence of numbers. It’s commonly used in for loops to iterate a specific number of times. Basic Syntax There are three ways to use range(): 1. range(stop) – One Parameter Form Generates numbers from 0 up to (but not including) the stop value. python for i in range(5):…

    Read More For loop 13 and 14th classContinue

  • Python Loops – While – Class 11 & 12
    Python

    Python Loops – While – Class 11 & 12

    Byadmin July 9, 2025July 11, 2025

    While Loops in Python with Examples A while loop in Python repeatedly executes a block of code as long as a specified condition remains true. It’s useful when you don’t know in advance how many times you’ll need to iterate. Basic Syntax python while condition: # code to execute while condition is true # don’t forget to…

    Read More Python Loops – While – Class 11 & 12Continue

  • Class 10 String Comparison ,Bitwise Operators,Chaining Comparisons
    Python

    Class 10 String Comparison ,Bitwise Operators,Chaining Comparisons

    Byadmin July 6, 2025July 6, 2025

    String Comparison with Relational Operators in Python πŸ’¬βš–οΈ In Python, you can compare strings using relational operators (<, <=, >, >=, ==, !=). These comparisons are based on lexicographical (dictionary) order, which uses the Unicode code points of the characters. πŸ“– How String Comparison Works πŸ€” Examples πŸ’‘ Python Important Notes πŸ“Œ String comparison is…

    Read More Class 10 String Comparison ,Bitwise Operators,Chaining ComparisonsContinue

  • Class 08 & 09 Conditional Statements
    Python

    Class 08 & 09 Conditional Statements

    Byadmin July 1, 2025July 6, 2025

    Conditional Statements in Python 🚦 Conditional statements in Python allow your program to make decisions based on specific conditions. Here’s a comprehensive overview: 1. if Statement βœ… Executes a block of code only if a condition is True. Python 2. if-else Statement ❓ Adds an alternative path when the if condition is False. Python 3….

    Read More Class 08 & 09 Conditional StatementsContinue

  • Class06,07 Operators, Expressions
    Python

    Class06,07 Operators, Expressions

    Byadmin June 30, 2025July 1, 2025

    In Python, operators are special symbols that perform operations on variables and values. They are categorized based on their functionality: βš™οΈ 1. Arithmetic Operators βž•βž–βœ–οΈβž— Used for mathematical operations: Python 2. Assignment Operators ➑️ Assign values to variables (often combined with arithmetic): Python 3. Comparison Operators βš–οΈ Compare values β†’ return True or False: Python…

    Read More Class06,07 Operators, ExpressionsContinue

  • Class05 Qa
    Python

    Class05 Qa

    Byadmin June 30, 2025June 30, 2025

    Read More Class05 QaContinue

  • Type Conversion Functions
    Python

    Type Conversion Functions

    Byadmin June 28, 2025June 28, 2025

    Type Conversion Functions in Python πŸ”„ Type conversion (or type casting) transforms data from one type to another. Python provides built-in functions for these conversions. Here’s a comprehensive guide with examples: 1. int(x) πŸ”’ Converts x to an integer. Python 2. float(x) afloat Converts x to a floating-point number. Python 3. str(x) πŸ’¬ Converts x…

    Read More Type Conversion FunctionsContinue

  • Dynamically Typed vs. Statically Typed Languages πŸ”„β†”οΈ
    Python

    Dynamically Typed vs. Statically Typed Languages πŸ”„β†”οΈ

    Byadmin June 27, 2025June 28, 2025

    Dynamically Typed vs. Statically Typed Languages πŸ”„β†”οΈ Dynamically Typed Languages πŸš€ Python Pros: Cons: Statically Typed Languages πŸ”’ Java Pros: Cons: Key Differences πŸ†š Feature Dynamically Typed Statically Typed Type Checking Runtime Compile-time Variable Types Can change during execution Fixed after declaration Error Detection Runtime exceptions Compile-time failures Speed Slower (runtime checks) Faster (optimized binaries)…

    Read More Dynamically Typed vs. Statically Typed Languages πŸ”„β†”οΈContinue

Page navigation

Previous PagePrevious 1 … 13 14 15 16 17 … 19 Next PageNext

© 2025 Learn Python - WordPress Theme by Kadence WP

Scroll to top
  • Python
  • Cyber Security Basics