فارسی
Loading...
Computer Science
||
Programming
||
Python
Several example codes
| understand the Python programming language |
Several example codes to better understand the Python programming language
Multiply Integer Pairs Without Using the Multiplication Operator
Calculate Inflation Rate and Predict Next Year's Price
Calculate the Number of Water Molecules Based on Volume in Liters
Convert Age from Years to Seconds
Calculate Insurance, Tax, and Net Income Based on Employee Salary
Display a Complex Number Using Real and Imaginary Parts
Repeat a String Based on User-Defined Text and Repetition Count
Calculate the Area of a Regular Polygon Using Side Length and Number of Sides
Calculate Wind Intensity Index Using Wind Speed and Air Temperature
Calculate the Volume and Surface Area of a Sphere Using Radius
Calculate the Volume and Surface Area of a Cylinder Using Radius and Height
Calculate the Area of a Parallelogram Using Base and Height
Check if a Number Is Palindromic
Calculate Power Using Repeated Addition Only
Generate First n Terms of the Fibonacci Sequence Using Recursion
Calculate Gravitational Force Between Two Objects Using Newton’s Law
Calculate Wind Chill Index Using Temperature and Wind Speed
Count Occurrences of a Digit Within a Number
Calculate Sine of an Angle Using Taylor Series
Find Three-Digit Numbers Equal to the Sum of Their Digit Factorials
Find Four-Digit Numbers Where Digit Powers Are Balanced
Calculate Least Common Multiple (LCM) of Two Numbers
Find Prime Numbers Based on Recursive Divisibility Rule
Sort Student ID Numbers Using Selection Sort
Sort a List of Input Numbers in Ascending Order
Divide Array Elements by Middle or Nearest Non-Zero Value
3×3 Matrix with Random Values and Statistical Analysis
Read, Reverse, and Display an Array Using Separate Methods
Calculate Vehicle Traffic Fines Based on Violation Codes
Find the Maximum Value in Each Row of a 4×4 Matrix
Generating an n×n Magic Square Using Diagonal Placement Rules
Finding Duplicate, Unique, and Common Elements Between Two Arrays Using NumPy
Check Goldbach's Conjecture for Even Numbers Greater Than 6 Using Prime Pairs
Display the Selected Character or Number Option in the Active Window
Count the Frequency of Each Word in a Dictionary Using Python
Perform Free Instrument Playback on a Device Using Python
Encrypt a String and Display the Result Using Python
Remove a Set of Employees from a String Using Python
Select Interleaved Characters from a String Based on Spaces
Convert Lowercase to Uppercase and Vice Versa in a String Using Python
Calculate the Sum of List Values Using Python
Filter Out Odd Numbers from a List Using Python
Count Positive Numbers in a List Using Python
شمارش تعداد اعداد مثبت در یک لیست با استفاده از پایتون
Find the Maximum Value in a List Without Using a Loop in Python
Convert a List to a Byte Array in Python
Identify the Longest River Covering More Than Half of the Plateau
Analyze Memory Usage of Numbers in Python Using getsizeof
Count Uppercase and Lowercase Letters in a String Using a Dictionary in Python
Define a Circle Class That Stores Radius in Variable r in Python
Username and Password Validation in Python
Draw a Minigram from a List Using Index and Value in Python
Calculate Surface Area and Volume of a Sphere Using a Class in Python
Compare Two Time Objects Using a Class and isEqual() Method in Python
Define an Instructor Class with ID, Last Name, Teaching System, and Payment in Python
Append Multiple Sentences to the End of Text File 1188 in Drive D Using Python
Save Multiple Sentences to a .TXT File on Drive D Using Python
Receive a Name and Logical Reason from User and Display Them Using Python
Extract and Display File Paths and Query Strings from a Text File Using Python
Display File Attributes Including Name, Access Time, Modification Time, and More Using Python
Read a Text File and Display Its Content with Pause After 32 Lines Using Python
Calculate Annual Salary Increase for Specialists After a 12.5% Raise Using Python
Calculate 185 Using Only Multiplication and Powers in Python
Display the Current Date and Time Using Python
Calculate the Expression n + n × n Using Python
محاسبه n × n × n × n (توان چهارم عدد) با استفاده از پایتون
Evaluate the Expression 𝑦 = 1 𝑥 2 + 𝑥 + 1 Using Python
Calculate Electrical Voltage Using Resistance and Current in Python
Calculate Total Resistance of Parallel Resistors Using Python
Calculate Total Resistance of Three Resistors Using Python
Convert Weight from Kilograms to Grams Using Python
Calculate the Area of a Triangle Using Base and Height in Python
Calculate Office Supply Cost Increase Based on Inflation Using Python
Calculate Acceleration of a Cyclist Over Time Using Python
Estimate Internet Usage as Water Volume and Calculate Travel Distance with Visual Data
Estimate Travel Distance Based on Acclimator Consumption and Thermocouple Lithium Battery Using Python
Detect Whether a Virus Runs as 32-bit or 64-bit Using Python
Display Operating System Name and Release Information Using Python
Display the Name of the Autumn Packages Website Using Python
Select the Best Surgical Method Based on a Treatment Plan Using Python
Using Loops to Reduce Code Length and Generate Repetition Tables in Python
Split Integer Digits and Print Them with Spacing in Python
Calculate Fuel Consumption per Mile in Gallons Using Python
Calculate the Area of a Trapezoid Using Python
Display the Square and Digit Sum of a Number Using Python
Calculate Diameter, Circumference, and Area of a Circle Using Python
Convert Years to Months, Days, and Seconds Using Python
Display the Name of the Currently Running File Using Python
Display the Full Path of the Currently Running File Using Python
Calculate How Many Books Fit on a Flash Drive Using Python
Display the Number of CPU Cores Using Python
Perform Basic Arithmetic Operations on Two Numbers Using Python
Display the Square and Inverse of a Number Using Python
Calculate Book Storage Based On Flash Capacity With Python
Calculate Expressions With M and N In Python
Calculate Sales Amount Based on Quantity and Unit Price Using Python
Calculate How Many Minutes You've Lived Based on Your Age Using Python
Convert Miles and Feet to Meters and Centimeters Using Python
Access Environment Variables Using Python
Display Active Terminal Users Using Python
Sort Three Numbers Without Conditionals or Loops Using Python
Overview of High School Majors for Secondary Level Students Using Python
Evaluate a Mathematical Expression Using x and y in Python
Display Search-Friendly Information Using Python
Bulk File Content Replacement Without Helpers Using Python
نمایش تعداد گروهها و گروههای خط زمان با استفاده از پایتون
Calculate Triangle Area Using Base and Height in Python
Calculate Net Salary with 10% Tax Deduction Using Python
Calculate Distance Between Two Points Using Python
Check Tile Coverage for a 1×3 Plot Using 2×2 Tiles in Python
Find the Intersection Point of Two Lines Using Python
Calculate y = b × sin(a) Using Python
Display Memory Usage of Multiple Data Items in Python
Display Current Hostname Using Python
Display ASCII Code of a Character Using Python
Display the Value of the n-th Bit of a Number Using Python
Combine the 16th Bit of One Number with the First Byte of Another in Python
Calculate the Average Between a Number and Zero Using Python
Toggle the n-th Bit of an Integer Using Python
Apply a Random Operation Between Two Numbers Using Python
Invert All Bits of an Integer Using Python
Display Minimum, Maximum, and Shared Values from a List of Integers in Python
Display-Current-System-Time-In-Python
Read Three Values and Display Their Data Types in Python
Reverse the Digits of a 5-Digit Number with Spaces in Python
Print Numbers Whose Digit Sum Is Divisible by r and j Using Python
Count Vowels in a String Using Python
Generate a Descending Number Triangle in Python
Simulate Rock, Paper, Scissors Game Between Two Players in Python
Display Numbers Between 1000 and 1100 Divisible by Their Digit Sum in Python
تشخیص رنگ انتخابشده با استفاده از کاراکتر ورودی در پایتون
Integer Division Using Repeated Subtraction in Python
Calculate the Harmonic Series up to n in Python
Generate a Number Triangle with Circle Prefix Using Nested Loops in Python
Print a Number Table with a Custom Pattern Using Nested Loops in Pytho
Generate Structured Number Output Using Nested Loops in Python
Generate Mixed Numerical Output Using Nested Loops in Python
Identify Personal Titles Based on Character Input in Python
Check If a Number Belongs to the Fibonacci Sequence in Python
Find All Combinations to Divide 1000 Units Using 500, 1000, and 2000 Blocks (With All Types Included)
Check Mutual Divisibility Between Two Numbers in Python
Simple Calculator with Symbol and Letter-Based Operators in Python
Display a Vertical and Horizontal Asterisk Pattern Based on Even Input in Python
Display All Mobile Operator Codes from 0 to 255 in Python
Generate a Progressive Number Pattern in Python
Count the Number of Characters in a String in Python
Count Descending Four-Digit Numbers with Unique Digits in Python
تبدیل نتایج عملیات منطقی به عدد در پایتون
Weighted Sum of Odd Digits by Position from Right in Python
Calculate Average of Odd and Even Digits in a Number Using Python
تولید تمام اعداد صحیح با استفاده از ارقام ۰، ۱ و ۲ در پایتون
Generate All Integers Using Digits 0, 1, and 2 in Python
Display All Four-Digit Numbers Using Digits 0, 1, and 4 Without Repetition in Python
Count Numeric Digits (0–9) in a Sentence Using Python
Generate a Number Grid with Even Increments in Python
Generate a Number Grid with 100-Step Increments and Variable Row Start in Python
Calculate the Sum of Powers of x from 1 to n in Python
Compute F(x, n, k) as a Summation-Based Expression in Python
Print an n × n Star Square in Python
Print a Hollow Star Square of Size n × n in Python
Print a Star Square with Borders and Diagonal in Python
Print a Star Square with Borders and Imaginary Diagonal in Python
Print a Star Square with Optional Diagonals When n = 0 in Python
Print a Left-Aligned Star Triangle Based on n in Python
Print Top Row, Last Column, and Main Diagonal in a Star Square (Python)
Print First Row, First Column, and Secondary Diagonal in a Star Square (Python)
Print Last Row, Last Column, and Secondary Diagonal in a Star Square (Python)
Print Lower Triangle with First Column, Last Row, and Main Diagonal in Python
Print First Row, Last Column, and Upper Triangle Including Main Diagonal in Python
Print Inverted Triangle with Last Column and Secondary Diagonal in Python
Print Secondary Diagonal and First Column in a Star Square (Python)
Print Symmetric Diamond Star Pattern in Python
Print Left-Aligned Triangle Star Pattern in Python
Print Mixed Pattern: Checkmark Triangle and Decreasing Star Lines in Python
Print Increasing and Decreasing Triangle Star Pattern in Python
Print Left-Aligned Increasing Star Triangle in Python
Print Centered Increasing Star Triangle in Python
Print Left-Aligned Spaced Star Triangle in Python
Calculate Net Salary Based on Insurance Type and Tax in Python
Multiply Two Integers in Python
Check for Zero Digit and Exit with -1 in Python
Print Increasing and Decreasing Powers of Two in Python
Count Zero Digits in Four-Digit Numbers in Python
Find Three Employees with Least Overtime in Python
Calculate Stats for People Aged 18–50 Based on Gender in Python
Calculate Annual Insurance Profit Over Multiple Years in Python
Calculate Compound Insurance Profit Over 11 Years in Python
Check for Perfect Number in Python
Find Numbers with Specific Digit Sum Between Two Limits in Python
Find Prime Numbers Between Two Numbers in Python
Display Digits Divisible by 2 or 3 in Python
Calculate One-Year House Cost in Python (With Exit Condition)
Calculate Nested Radical to 10 Decimal Places in Python
Matchbox Game Simulation Between Two Players in Python
Track Remaining Matchsticks Step-by-Step in Python
Print Triangle Pattern Using Asterisks in Python
Calculate Area and Perimeter of a Right Triangle in Python
Classify a Character into Vowel, Consonant, Digit, or Other in Python
Display Multiples of y from 1 to x in Python
Find the Highest Conditional GPA Among Students in Python
Calculate Average GPA Above 15 for 15 Students in Python
Calculate the Sum of a Fractional Product Series in Python
Evaluate a Custom Fractional Series to n Decimal Places in Python
Count Students with GPA Between 10 and 15 in Python
Generate a Recursive Average Series in Python
Calculate the Average of n Numbers in Python
Check Perfect Square Using Sum of Odd Numbers in Python
Increment Each Digit and Wrap 9 to 0 in Python
Approximate π Using a Custom Fractional Series in Python
Check Collinearity of Three Points and Print Line Equation in Python
Calculate the Overlapping Area Between Two Rectangles in Python
Solve a Nonlinear Equation Using the Bisection Method in Python
Calculate the Sum of a Geometric Series in Python
Print Uppercase and Lowercase English Letters in Python
Sum Sequential Inputs Until a Decrease Is Detected in Python
Evaluate a Mathematical Expression Over a Range in Python
Evaluate an Alternating Power Series in Python
Evaluate an Alternating Even-Power Series with Odd Denominators in Python
Evaluate a Geometric-Like Power Series in Python
Evaluate a Custom Alternating Series with Powers of x in Python
Calculate Linear Regression Equation from Data Points in Python
Generate Output Based on Row Count in Python
Generate a Sequential Number Triangle in Python
Generate a Right-Aligned Star Triangle in Python
Print a Right-Aligned Star Pyramid in Python
Print a Number Pyramid with Repeating Row Values in Python
Calculate the Sum of Repeated Digit Series in Python
Evaluate a Complex Expression Involving Powers, Factorials, and Summation in Python
Check the Least Significant Bit of a Binary Number in Python
Detect the Most Significant Bit of a Binary Number in Python
Check Valid Sets Using Triangle Inequality in Python
Draw a Hollow Rectangle Pattern in Python Based on Row Input
Draw a Rotated 'P'-Shaped Asterisk Pattern in Python
Count Isosceles Triangles Using Digits 1–10 in Python
Display the Shape of Digit 8 Using Nested Loops and Asterisks
Print Character 'B' for an Even Number of Rows Using a Loop
Draw a Triangle with Star Borders and Zero Interior in Python
Evaluate an Alternating Power-Factorial Series in Python
Evaluate a Custom Power-Factorial Series with x and n in Python
Display the Letter 'C' Using Nested Loops and Asterisks
Display the Letter 'D' Using Loops and Asterisks in the Terminal
Print Asterisk '*' for a Given Number of Lines Using a Loop
Display Asterisk '*' Using Nested Loops Based on Line Count
Display the Letter 'G' Using Loops and Asterisks
Display the Letter 'H' Using Loops and Asterisks
Print Double Asterisk '**' in Each Line Using a Loop
نمایش رشته "** z" در هر سطر با استفاده از حلقه تکرار
Display Character 'x' in Each Line Using a For Loop
Display the Character '*' in Each Line Using a For Loop
Display the Letter 'M' Using Nested Loops and Asterisks
Display '*' and '1' in Each Line Using a Loop
Display '*' and '0' in Each Line Using a Loop
نمایش متن بهصورت کاراکتر به کاراکتر با استفاده از حرف 'x'
Display Arbitrary Number of '*' Characters Using Nested Loops
Display '*' Character in Each Line Using a Loop
Display a Custom Number of '*' Characters Using a Loop
Display the Character '7' Based on Number of Trips Using a Loop
Display the '*' Character 17 Times Using a Loop
Display Characters 'X' and '*' in Each Line Using a Loop
Display the Character 'Z' Using '*' in Each Line
Determine Season, Month, and Day from Day of the Year
Calculate n Terms of a Mathematical Series Using a Loop
Calculate Long-Distance Call Charges Based on Time and Holiday Rules
Calculate Water Consumption Charges Based on Usage Type
Calculate Gross Cost, Tax, and Total Cost of Phone Calls for Multiple Subscribers
Find All Numbers Containing a Given Digit (0–9999)
Calculate the Difference Between Product and Division Using a Method
Calculate the Average of Three Numbers Using a Method
Recursive Countdown from a Given Number to One
Raise a Double to an Integer Power Using a Method
Understanding the Harmonic Series: A Divergent Infinite Sum
Convert Fractional Stock Price to Decimal (Double)
Calculate Parking Fee Based on Duration and Extra Hours
Calculate Parking Fee Based on Hours and Minutes (24-Hour Flat Rate)
محاسبه هزینه پارکینگ بر اساس ساعت و دقیقه (نرخ ثابت ۲۴ ساعته)
Calculate the Greatest Common Divisor (GCD) Using Recursion
Determine Whether a Sample Is a Bag
Check Whether Sally Has Taken Her Bag
Toggle Letter Case Using XOR Bitwise Operation
Check Whether a Number Is a Perfect Square
Calculate √|x − a|¹¹ from User Input
Convert Numeric Score to Letter Grade (A, B, C, F)
Convert Age (Years, Months, Days) to Minutes and Seconds
Calculate Income Tax Based on Salary Brackets
Calculate Product of Digits Greater Than 5
Calculate Final Grade Using Weighted Average
Check If a Number Is a Power of 3
Calculate Box Volume Using Parameters
Calculate Discount Amount from Price and Percentage
Calculate Years to Reach Target Balance with Annual Interest
Character Type Detection: Digit, Uppercase, or Lowercase
Sum of Factorials from 1 to n
Calculate the Series: n/n! Sum from 1 to n
Compute Exponential Series Approximation for eˣ
Calculate the Sum of a Series Between Two Numbers
Sum of the First 11 Terms of a Numeric Series
Calculate the Sum of 21 Terms Starting from 2 and 11
Convert a Number to Binary and Validate the Output
Recursive Conversion of 11 from Decimal to Binary
Recursive Computation of the n-th Derivative of 𝑒 𝑎 𝑥
Display the First 15 Terms of a Recursive Sequence Starting from 2
Evaluate the Function 𝑌 ( 𝑥 ) = 𝑥 3 − 3 𝑥 2 + 6 for Integer and Decimal Inputs
Evaluate the Polynomial Function with Two Decimal Places
Calculate the Area of a Triangle Using Base and Height
Convert Uppercase to Lowercase Using a Lookup Table (No '+' Operator)
Toggle Case Using XOR Operator
Compute the Exponential Series Sum Without the Zeroth Term
Compute the Gamma Series Approximation for x and n
Binary Logic Operations: XOR, OR, AND, NOR, NAND
Find Perfect Numbers ≤ 11 That Are Multiples of 11
Display Multiples of 3 Less Than n Using a Recursive Method
Calculate New Salary Based on Percentage Increase
Calculate Falling Distance Under Gravity for Each Second
Calculate Third Side of Triangle Using Law of Cosines
Geometry Area and Salary Calculation Based on User Input
Recursive Power Calculation: C^m
Recursive Number Reversal
Recursive Multi-Branch Function Q(m, n)
Compute Mathematical Expression Using x, a, and n
Compute Factorial-Power Series Based on g and n
Compute Algebraic Series with Powers and Fractions for x and n
Trigonometric Series Using Tangent and Sine for x and n
Cosine Approximation Using Maclaurin Series
Arcsin(x) Approximation Using Maclaurin Series
Compute Series with Square Roots and Factorials for n
Compute Series with Radical Differences and Algebraic Denominator
Compute Logarithmic Series with Variable Powers for n
Compute Series with Odd Square Roots and Cubic Denominators
Trigonometric Series with sin(yᵢ) over cos(yᵢ)·cos(yᵢ₊₁)
Compute Weighted Power Series Based on n
Compute Linear Fraction Series with Variable x and n
Compute Fractional Series with Triple Products in Numerator and Denominator
Compute Descending Coefficient Series with x and n
Compute Recursive Continued Fraction with n Terms
Display Multiples of 7 Without the Digit 7 up to n
Display Multiples of n Without Shared Digits
Check if Digits Decrease by 4 from Right to Left
Compute the nth Catalan Number
Find Amicable Number Pairs up to n
Menu-Driven Calculation Program
Goldbach Pair Finder for Even Numbers
Monthly Rainfall Comparison with Annual Averages
Team Score Tracker for Sports Tournament
Count and Locate Repeated Numbers in a List
Store Transpose of a 1×1 Matrix in B
Evaluate Polynomial from Coefficient Array and x
Classify Input Numbers as Positive or Negative
Remove First Element from 12-Item Array
Append First Element of Second Array to First Array
Count Occurrences of x in Array a
Compute Outer Product of Two Vectors and Store in Matrix
Rotate a 2D Matrix by 90 Degrees
Count Frequency of Numbers in a 10-Element Array
Count and Locate Occurrences of a Number in a 5-Element Array
Compute Product of Non-Border Non-Zero Elements in a 2D Matrix
Check if Diagonal Elements Match Border Elements in Square Matrix
Respond to "Yes/No" Query Based on Curiosity Elements in Matrix
Detect Duplicate Element in a 4×4 Matrix
Check if All Elements in 5×5 Matrix Are "Yes"
Check if All Non-Border Elements in 4×4 Matrix Are "Yes"
Check if Sign of Each Row Is Sorted in Ascending Order
Check if a 4-Element Array Is Sorted in Ascending Order
Simulate Dice Rolls and Analyze Sum Probabilities
Sum of Main and Secondary Diagonal Elements in a Square Matrix
Sum Prime Numbers and Print Values Greater Than That Sum
Generate Two Random Arrays and Show Their Difference
Left-Rotate a 10-Element Array by a Given Amount
Find Prime Numbers up to 199 Using the Sieve of Eratosthenes
Recursive Sum of a 10-Element Array
Define a 10-Element Array with Initial Rightward Displacement
Shahin | Several example codes