Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 731 Bytes

File metadata and controls

22 lines (17 loc) · 731 Bytes

Python Learning 🐍

Programs written while learning Python basics.

for-loop

  • Countdown – counts down from a number to 0
  • Sum of 5 numbers – takes 5 inputs and prints their sum
  • Print triangle – prints a star triangle of n rows
  • Table of number – prints multiplication table
  • Numbers 1-50 – prints numbers from 1 to 50
  • Divisible by 3 not 6 – filters numbers by condition

while-loop

  • Guess secret number – keeps asking until you guess right
  • Find even & odd – checks if a number is even or odd
  • Find larger number – compares two numbers

if-else

  • Find larger number – uses if-else to compare

Basics

  • Hello, World – first Python program