12pdf Merged
12pdf Merged
P
Program to print pattern
Write a program that inputs a string that contains a
decimal number and prints out the decimal part of the
number. For instance, if 515.8059 is given, the
program should print out 8059.
Write a program that inputs a list, replicates it twice
and then prints the sorted list in ascending and
descending orders.
Write a program that inputs a list, replicates it twice
and then prints the sorted list in ascending and
descending orders.
2.Finding Common Elements in Multiple Lists
Code
Output
3.Removing an element from the List
Code
Output
Loop Programs
4.Functions to calculate factorial of a number
Code
Output
5.Function to count occurrences of a letter in a word
Code
Output
6.Printing numbers in reverse from 9 to 1 using a for loop
Code
Output
If – Else Programs
7.Function to check if a year is a leap year or not
Code
Output
8. program to find the largest number among three numbers
Code
Output
Elif Ladder
10. Function to determine type of day based on its
number
Code
Output