0% found this document useful (0 votes)
10 views4 pages

Employee Salary Slip and Program Tasks

The document outlines a series of programming tasks for students in STD XI-I for the academic year 2025-26. It includes various programming challenges such as creating salary slips, calculating roots of quadratic equations, and manipulating strings and lists. Each task is designed to enhance students' coding skills and understanding of algorithms.

Uploaded by

malarravee01
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)
10 views4 pages

Employee Salary Slip and Program Tasks

The document outlines a series of programming tasks for students in STD XI-I for the academic year 2025-26. It includes various programming challenges such as creating salary slips, calculating roots of quadratic equations, and manipulating strings and lists. Each task is designed to enhance students' coding skills and understanding of algorithms.

Uploaded by

malarravee01
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

CHETTINAD VIDYASHRAM

STD XI -I TERM RECORD PROGRAMS(2025-26)


1. Write a program to accept the name and the basic pay of an employee and print the neat salary
slip for the employee.[DA=20% of BP, HRA=30% of BP, TA=10% of BP, PF-13% of
BP,IT=5% of BP, Gross-BP+TA+DA+HRA ,Deduction=PF+IT, Net pay-Gross-Deduction]
SALARY SLIP
NAME: XXXXXXXXX

BASICPAY PF:
DA IT:
HRA
TA
GROSS DEDUCTION:
NET PAY

2. Write a program to find the roots of quadratic equation.

3. Write a menu driven program for the following:


i. To find the LCM & GCD of the given numbers.
i. To print whether the given number is a perfect number or not.
4. Write a program to find the sum of the following series.
X-X'/ 2! +X13! -...+ X2n- /n!
5. Write a program to accept a number and print its square and cube until the user type zero using
while loop.
6. Write a program to print the following output using for loop.
1
2 3
4 5 6
7 8 9 10

7. Write a program to accept a number and reverse the number. Print the reversed number and print
the count of odd digits and even digits of the number using while loop.
8. Accept a sentence and print Number of uppercase characters, lowercase characters, spaces,
digits and special characters.
9. Write a program that does the following.
i)Accept two inputs: one integer and one string
ii) Extract all the digits, in the order they occur from the given string, add the given integer
input and the digits extracted from the string.
ii) If no digits occur in the given string, set the extracted digit to 0.
Output 1:
Enter integer no: 12
Enter the string: a4b5c6
given number = 12 given string = a4b5c6 sum = 12 + 456 = 468
Output 2:
Enter integer no: 20
Enter the string:hello
given number = 20 given string = hello sum = 20 + 0 = 20
10. Write a program that reads a line of strings and print all the palindrome words from the lme.
Eg. S=Ajay has a RacecAr. He is a level 1 racer."
Palindrome words: RacecAr level

[Link] aprogram to input astring Sl. Input two substrings S2 and S3 existing in Sl and a
replacement string S4. Replace the range of strings starting from S2 tillend of S3 with S4.
Eg: Given string Sl= "onetwo three one two three'
Substring S2='two'
Substring S3 =th'
Substring S4 = five'
Output: one fiveree one two three
[Link] aprogram that takes a string with multiple words and then capitalizes the first letter of
each word and reverses all three letter words.
Eg: Given String = I have a car in red colour
New string = I Have A raC In deR Colour'
[Link] aprogram that reads a line and prints the longest word, its length and print the same
word without vowels.
Eg: Given String =Python offers many methods for string manipulation'
Output 1 =Longest substring: manipulation Its Length: 12
Output 2 = Longest substring without vowels :mnpltn
14. Accept N numbers in a list. Swap elements at the even location with the elements at the odd
location. {Alternate position)
Eg. L=[99,-3, 40,60,12,-15] after swapping: L = [-3,99,60,40,-15,12]
15. Accept N numbers in a list. Accept one more number. Print the position of all occurrences of
the number otherwise print the erTor message.
Eg. L=[1,2,3,1,4,1] if num=1 then output 1is present at position i
lis present at position 4
is present at position 6
16. Accept N numbers in a list. Remove all the duplicate values in the list withoul using a parallel
list. Print the list before and after removal of duplicates.
Eg. If L-[3,3,1,55, 1,1,3,7] after removal of duplicates L-3,1,55,7]
17. Write a program to accept n elements in a list. Print the element twice, if itis a number and
print with * at the end if it is a string.
Eg. L-['RAMAN', 21, 3, YOGARAJ', 16, TARA']
Output should be:
RAMAN*
2121
33
YOGARAJ*
1616
TARA*
18. Accept list ofN Places.
Find and
equal to 5 characters and does notdisplay those place names, in which there are more than or
start and end with vowels.
Eg. L-[TRICHY', 'MADURAI', 'SALEM,'CHENNAI,
Output: TRICHY SALEM 'BANGALORE']
19. Accept the limit M and mixed data types
as elements of List L. Create two Lists Ll
copy all the integer elements which are divisible and L2,
R or ending with 'n' from L to L2. by 5 from L to Ll and the strings starting withto
Print all the lists.
Eg. L=[1, 3.3, 25, 'Main', 'Holiday', 15, Rain'] then L1-[25,15], L2=['Main', 'Rain']
20. Accept enroll, student name and 3 subject marks of N
Total and Average. Print all the details in the format number of students in a list. Calculate
given below.
ENROLL STUDENT NAME SUB1 SUB2 SUB3 TOTAL AVERAGE
1.
2.
I TERM (2025-26)

[Link] DATE INDEX PAGE


T. SIGN
NO.
1 04/06/2025 SALARY SLIP
2 11/06/2025 ROOTS OF QUADRATICEQUATION
3 11/06/2025 MENUDRIVEN PROGRAM TO FIND LCM
GCD OF THE NUMBERS AND PERFECT AND
NUMBER
4 18/06/2025 PRINT THE SUM OF THE SERIES
5 25/06/2025 PRINT THE SQUARE AND CUBE OF THE GIVEN
NUMBER
6 25/06/2025 PRINT THE FORMAT USING NESTED
LOOPS
7 02/07/2025 NUMBER MANIPULATION
COUNTING UPPERCASE, LOWER CASE
8 02/07/2025 ALPHABETS, DIGITS,SPACES AND SPECIAL
CHARACTERS IN ASTRING
9 09/07/2025 PRINT THE SUM OF NUMBERS PRESENT IN THE
GIVEN STRING
10 09/07/2025 PRINT PALINDROME WORDS FROM THE STRING
11 16/07/2025 REPLACING SUB STRING WITH GIVEN STRING

12 16/07/2025 CONVERTING WORDS INTOTITLE CASE AND


REVERSING THREE LETTER WORDS
PRINTLONGEST WORD FROM THE GIVEN
13 23/07/2025 STRING
AND PRINT THE SAME WITHOUT VOWELS
|SWAPPING THE ELEMENTS FROM ODD
14 23/07/2025 LOCATION TOEVEN LOCATION, AND VICE
VERSA
15 30/07/2025 |LINEAR SEARCH OF A NUMBER AND PRINTING
THE POSITION IN ALIST
16 30/07/2025 REMOVING DUPLICATE ELEMENTS FROM A LIST
WITHOUT USING PARALLEL LIST
17 06/08/2025 MANIPULATING LISTELEMENTS
18 06/08/2025 STRING MANIPULATION IN LIST
19 13/08/2025 CREATING NEW LISTS FROM EXISTING LIST
20 13/08/2025 CREATING A NESTEDLIST

Common questions

Powered by AI

Split the string into words, capitalize the first letter of each word using a method like .capitalize() or .title(), and check each word’s length. Reverse words containing exactly three letters by slicing with a step of -1. Join these processed words back into a single string .

Traverse each character in the input string, checking for digits using character properties like .isdigit(). Accumulate digits into a temporary string, converting this string to an integer once a non-digit character is encountered, and add it to a running total. Handle missing digits by defaulting to zero sum .

To find palindrome words in a string, split the sentence into individual words and check each word by reversing it and comparing it to the original. If the reversed word matches the original, it is a palindrome. Print or store any words that satisfy this condition .

To reverse a number and count the odd and even digits, use a while loop to iterate through each digit of the number, appending it to a new reversed number variable. During each iteration, check if the digit is odd or even by using modulus operation (digit % 2) and increment the respective counter. Continue this process until no digits remain in the original number .

To swap elements at even and odd locations in a list, iterate over the list indices using a step size of 2. For each even index, swap the element with the subsequent odd index using a temporary variable or tuple swapping. Continue until the end of the list .

Parse through a composite list holding student details either as a dictionary or nested list, extracting relevant indices for each student’s name and scores. Calculate and store totals and averages, then display each student’s data neatly, leveraging string formatting for alignment .

To calculate the net pay of an employee, start by identifying the following components: DA (Dearness Allowance), which is 20% of Basic Pay (BP); HRA (House Rent Allowance), which is 30% of BP; TA (Travel Allowance), which is 10% of BP; PF (Provident Fund), which is 13% of BP; and IT (Income Tax), which is 5% of BP. Compute the Gross Pay as BP + DA + HRA + TA. Then calculate the total deductions as PF + IT. Finally, determine the net pay by subtracting the total deductions from the gross pay .

Identify the indices of the start substring (S2) and end substring (S3) in the given string (S1). Extract the portion to replace by finding the position immediately after S2 and stopping just before S3 ends. Replace this range with a new substring (S4) by concatenating the parts of S1 before S2, S4, and the remaining S1 following S3 .

To find the LCM and GCD of two numbers programmatically, the Euclidean algorithm efficiently finds the GCD by repeatedly applying the operation gcd(a, b) = gcd(b, a % b) until b equals zero. The LCM can then be derived from the relation LCM(a, b) = (a * b) / GCD(a, b).

Iterate through the list, maintaining a set to track seen elements. For each element, check if it's not in the set, append it back to the same list, marking it as seen. Finally, trim the list to contain only the added unique elements .

You might also like