






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Hands on fun codes for beginners to try out in python! (features output and the working idea behind each code) Index 1.Age Checker 2.While Loop with continue 3.Even / Odd Checker 4.Vowel counter 5.Largest Number 6.Reverse a String 7.Sum of Digits 8.Word Counter 9.Prime Number Checker 10.Uppercase Counter 11.Palindrome Checker 12.Multiply List numbers 13.Numbers Divisible by 3 14.Digit Counter 15.Smallest Number 16.Consonant Counter 17.Star Pattern 18.Even Numbers in Range 19.Replace Spaces 20.Sum of Even Numbers 21.Remove Vowels 22.Multiplication Table 23.Print N Natural Numbers 24.Count Character Occurrences 25.Leap Year Checker
Typology: Study Guides, Projects, Research
1 / 12
This page cannot be seen from the preview
Don't miss anything!







Program No. Name / Description Purpose / What it Does 1 Age Checker Classifies age into "young", "teenager", or "adult" 2 While Loop with Continue Demonstrates while loop, continue statement, and else block 3 Even / Odd Checker Checks each number in a list and prints if it is even or odd 4 Vowel Counter Counts the number of vowels in a word 5 Largest Number Finds the largest number in a list 6 Reverse a String Reverses the input string 7 Sum of Digits Calculates the sum of digits of a number 8 Word Counter Counts the number of words in a sentence 9 Prime Number Checker Checks if a number is prime or not 10 Uppercase Counter Counts the number of uppercase letters in text 11 Palindrome Checker Checks if a word is a palindrome 12 Multiply List Numbers Multiplies all numbers in a list 13 Numbers Divisible by 3 Prints numbers from 1 to 30 divisible by 3 14 Digit Counter Counts number of digits in a number 15 Smallest Number Finds the smallest number in a list 16 Consonant Counter Counts consonants in text 17 Star Pattern Prints a simple triangle star pattern 18 Even Numbers in Range Prints all even numbers in a user-defined range 19 Replace Spaces Replaces all spaces in text with hyphens 20 Sum of Even Numbers Calculates the sum of all even numbers in a list 21 Remove Vowels Removes vowels from the text 22 Multiplication Table Prints the multiplication table of a number 23 Print N Natural Numbers Prints first N natural numbers 24 Count Character Occurrences Counts how many times a specific character occurs in text 25 Leap Year Checker Checks whether a year is a leap year or not Outputs have been given in boxes
What it is intended to do:
No input required Digits: 5 Input: 50492 Smallest number: 1 Input: 8 3 10 1 6
nums = input("Enter numbers: ").split() smallest = int(nums[0]) for n in nums: n = int(n) if n < smallest: smallest = n print("Smallest number:", smallest) PROGRAMME 16 What it does:
**
No input required
n = int(n) if n % 2 == 0: total += n print("Sum of even numbers:", total) PROGRAMME 21 What it does: