0% found this document useful (0 votes)
9 views3 pages

Programming Basics: 22 Simple Tasks

Uploaded by

SARWESH TECH
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Programming Basics: 22 Simple Tasks

Uploaded by

SARWESH TECH
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Week 1

Program 1: HelloWorld
Output: Hello, World!

Program 2: Sum of two numbers


Output: Sum = 15

Program 3: Factorial of 5
Output: Factorial = 120

Program 4: Fibonacci Series (5 terms)


Output: 0 1 1 2 3

Program 5: Search element in array


Output: Found

Week 2

Program 6: Reverse a string


Output: olleh

Program 7: Palindrome check (121)


Output: Palindrome

Program 8: Largest of three numbers (10, 20, 5)


Output: Largest = 20

Program 9: Prime number check (7)


Output: Prime

Program 10: Multiplication Table of 5


Output:
5x1=5
5 x 2 = 10
...
5 x 10 = 50

Week 3

Program 11: Array sorting


Output: [1, 2, 3, 4, 5]

Program 12: Matrix addition


Output: [[6, 6], [6, 6]]

Program 13: Armstrong number check (153)


Output: Armstrong

Program 14: Even/Odd check (10)


Output: Even

Program 15: String length (Hello)


Output: Length = 5

Week 4

Program 16: GCD of 12 and 18


Output: GCD = 6

Program 17: LCM of 4 and 6


Output: LCM = 12

Program 18: Swap two numbers


Output: a=10, b=20 → a=20, b=10

Program 19: Simple Calculator (10+5)


Output: 15
Program 20: Count vowels in 'Hello'
Output: 2

Week 5

Program 21: Check prime factors of 12


Output: 2, 3

Program 22: File read/write sample


Output: File Created Successfully!

You might also like