Basic Math Module Arithmetic Operations This module contains basic arithmetic operations like addition, subtraction, multiplication, and division that can be performed on numbers.
Accessing Updating Variables Outside Functions In Python, this code demonstrates how the global variables allow us to access and update their values outside of functions.
Understanding Global and Local Variable Scope Learn how to access global and local variables in Python, and understand the concept of variable scope. See an example code and explanation.
Python code for Simulating a Traffic Light The code includes user-defined functions for determining the light color and providing a corresponding message, stay safe on the roads.
Calculate Area and Perimeter of a Rectangle This Python code demonstrates how to calculate the area and perimeter of a rectangle using a function calcAreaPeri
Introduction to using functions in Python See an example of a function call and discover how a common error can be fixed by placing the function definition before the function call.
Display Mixed Fraction for an Improper Fraction Display a mixed fraction for an improper fraction. Check if the input fraction is improper and call the mixedFraction() function for display.
Python Function to Display Full Name This code takes a first name and last name as input and combines them using the + operator to form a full name, which is then displayed.
Python Code to Calculate Factorial This Python code calculates the factorial of a given number using a for loop and displays the result
How to Compute Mean Values with Python Create a code that calculates mean of a list of floating point values. It adds up all the numbers and divides by the total count of elements.
Add 5 to a User Input Number Python code: Adds 5 to user input using a function. Displays id() before and after the call to check memory location change.
Find Sum of First n Natural Numbers | Pictoblox Sum of first n natural numbers. Efficient and concise solution to calculate and display the sum. Ideal for developers of all levels.
Python Function to Add Two Numbers Learn how to write a Python function that accepts two numbers, calculates their sum, and displays the result.
Calculate the Cost of a Tent – User defined Func Python program to compute tent cost with cylindrical and conical parts. Calculates total canvas area and final payable amount including tax.
Calculate Payable Amount for a Tent | Pictoblox This program calculates the canvas area based on tent dimensions, computes the canvas cost, adds tax, and determines the net payable amount.
Calculate the Factorial of a Number | Pictoblox This Python program uses a for loop nested inside an if...else block to calculate the factorial of a given number.
Prime Numbers between 2 to 50-Nested Loops Learn to use nested loops to find prime numbers between 2 to 50. Prime numbers are numbers that are divisible only by 1 and themselves.
Generate Pattern for a Number | Pictoblox Generating a pattern consists of rows starting from 1 and increasing by 1 with each row for a number input by the user.
Python Nested For Loops – Iteration and Looping Learn how to use nested for loops in Python. Understand the logic, see the code output, explore different iterations of the outer/inner loops
Printing Values from 0 to 6 Except 3 | Pictoblox Lets write a Python code that prints values from 0 to 6, excluding the number 3. Understand the logic behind the code and see the output."
Check If a Number is Prime or Not | Pictoblox This Python program checks whether a given number is prime or not. If the number is less than or equal to 1: we need to execute again!"
Use of break statement in For loop | Pictoblox Learn how to use the break statement in a for loop in Python, with a simple program demonstrating its usage.
Find Factors of a Number Using While Loop Find the factors of a number using a while loop in Python. This code example will help you understand the logic and provide the output.
Print First 5 Natural Numbers Using a While Loop Print the first 5 natural numbers using a while loop, uses a counter variable to control the loop and increment it until the count reaches 5.
Printing Even Numbers in a Given Sequence Print all the even numbers in a given sequence. This code uses a for loop and modulus operator to determine if each number is even or odd."
Print Sequence of Numbers- For Loop | Pictoblox Learn how to use the for loop in Python to print a sequence of numbers, understand its logic with step-by-step explanations.
Print First Five Natural Numbers | Pictoblox Learn how to use Python to print the first five natural numbers & what we do if we are asked to print the first 100,000 natural numbers?
Find the Larger of Two Numbers | Pictoblox This Python program compares two numbers and prints the larger one using if-else statements, the program will output which number is larger
Create a Four Function Calculator | Pictoblox Four functional calculator prompts the user to enter two values and an operator, performs the specified operation and displays the result.
Print the Difference of Two Numbers | Pictoblox Find the difference between two input numbers prompts the user to enter two numbers and then calculates and displays their difference."
Find the Sum of Positive Numbers | Pictoblox Python program to find the sum of all the positive numbers entered by the user till the user enters a negative number.