CS File 11th
CS File 11th
CODE
OUTPUT
Q2) WAP to find which no is greater no in 3 numbers.
CODE
OUTPUT
Q3) WAP to enter a number and check whether the
number contains 5 in its one’s place or not.
CODE
OUTPUT
Q4) WAP to enter a number and check whether the
number contains 5 in its tens place or not.
CODE
OUTPUT
Q5) WAP to enter a number and check whether the
number is divisible by 5 and 11 or not.
CODE
OUTPUT
Q6) WAP to enter a digit and display the digit in text
(0 will be displayed as ZERO)
CODE
OUTPUT
Q7) WAP to enter a character and check whether
the entered character is vowel or not.
CODE
OUTPUT
Q8) Write a python program to check whether the
year is leap year or not.
CODE
OUTPUT
Q9) WAP to input marks in 3 subjects and compute percentage and then
calculate grades as per following guidelines:
PERCENTAGE GRADE
>90 A
>80 &<=90 B
>70 &<=80 C
>60 &<=70 D
ELSE E
CODE
OUTPUT
Q10) WAP to enter a number and display its factorial.
CODE
OUTPUT
Q11) WAP to enter a number and check whether the
number is Prime or not.
CODE
OUTPUT
Q12) WAP to enter a number and check whether the
number is Perfect or not.
CODE
OUTPUT
Q13) WAP to enter a number and reverse the
number.
CODE
OUTPUT
Q14) WAP to enter a number and check whether the
number is Palindrome or not.
CODE
OUTPUT
Q15) WAP to enter a number and check whether the
number is Armstrong number or not.
CODE
OUTPUT
Q16) WAP to display the following pattern:
*
**
***
****
*****
CODE
OUTPUT
*
**
***
****
*****
Q17) WAP to display the following pattern:
*****
****
***
**
*
CODE
OUTPUT
*****
****
***
**
*
Q18) WAP to display the following pattern:
1
22
333
4444
55555
CODE
OUTPUT
1
22
333
4444
55555
Q19) WAP to display the following pattern:
1
12
123
1234
12345
CODE
OUTPUT
1
12
123
1234
12345
Q20) WAP to display the following pattern:
1
21
321
4321
54321
CODE
OUTPUT
1
21
321
4321
54321
Q21) WAP to display the following pattern:
12345
1234
123
12
1
CODE
OUTPUT
12345
1234
123
12
1
Q22) WAP to display the following pattern:
12345
2345
345
45
5
CODE
OUTPUT
12345
2345
345
45
5
Q23) WAP to display the following pattern:
54321
4321
321
21
1
CODE
OUTPUT
54321
4321
321
21
1
Q24) WAP to display the following pattern:
5
45
345
2345
12345
CODE
OUTPUT
5
45
345
2345
12345
Q25) WAP to display the following pattern:
5
54
543
5432
54321
CODE
OUTPUT
5
54
543
5432
54321
Q26) WAP to enter a string and check whether the
string is palindrome or not.
CODE
OUTPUT
Q27) WAP to enter a sentence (string) and display
the smallest word.
CODE
OUTPUT
Q28) WAP to enter a sentence (string) and display
the longest word.
CODE
OUTPUT
Q29) WAP to enter a sentence (string) and convert
it into title case.
For ex: If user inputs: python is fun
Then: Outputs should be: Python Is Fun
CODE
OUTPUT
Q30) WAP to enter n integer elements in a Tuple and
check whether all the elements are in ascending order
or not.
CODE
OUTPUT
Q31) WAP to enter n integer elements in a Tuple and
display the second highest element.
CODE
OUTPUT
Q32) WAP to create a nested tuple of n elements
where each element of nested tuple contains RN,
NAME AND MARKS.
For example =((1,"RAHUL",99.9),(2,"ROHIT",100))
CODE
OUPUT
Q33) WAP to enter a key and display the
corresponding value stored in a Dictionary, if key does
not exists then write appropriate message "key does
not exist"
CODE
OUTPUT
Q34) WAP to enter elements (name: marks) in a
Dictionary and update the value of particular key
entered by user.
CODE
OUTPUT
Q35) WAP to enter elements (name: marks) in a
Dictionary and count the students whose marks is
>90.
CODE
OUTPUT
Q36) WAP to enter elements (name: marks out of
500) in a dictionary and display the students whose
name starts with A.
CODE
OUTPUT
Q37) WAP to enter n elements (name: marks) in a
dictionary and delete the element whose key is
entered by user.
CODE
OUTPUT
Q38) WAP to enter n elements (name: marks out of
500) in a Dictionary and delete all the elements
whose percentage is <90.
CODE
OUTPUT
Q39) WAP to enter n elements (name: marks out of
500) in a dictionary and delete all the elements whose
percentage is <90, also store all the deleted elements
in another dictionary and display them.
CODE
OUTPUT
Q40) WAP to enter 10 elements of Integer type and
display the greatest element.
CODE
OUTPUT
Q41) WAP to enter N elements of integer type in a
list and search an element using linear search.
CODE
OUTPUT
Q42) WAP to enter N elements of integer type in a
list and Search an element using binary search.
CODE
OUTPUT
Q43) WAP to enter N elements of integer type in a
list and rearrange the elements as per the following
if input list L1 contains
3 7 9 6 10 8 14 5 4 12
Then output list L1 should contain the following
7 3 6 9 8 10 5 14 12 4
CODE
OUTPUT
Q44) WAP to enter N elements of integer type in a
list and rearrange the elements as per the following
if input list L1 contains
3 7 9 6 10 8 14 5 4 12
Then output list L1 should contain the following
8 14 5 4 12 3 7 9 6 10
CODE
OUTPUT
Q45) WAP to enter N elements of integer type in a
list and rearrange the elements as per the following
if input list L1 contains
3 7 9 6 10 8 14 5 4 12
Then output list L1 should contain the following
12 4 5 14 8 10 6 9 7 3
CODE
OUTPUT
Q46) WAP to enter N elements of integer type in a
list and rearrange the elements as per the following
if input list L1 contains
3 7 9 6 10 8 14 5 4 12
Then output list L1 should contain the following
6 14 18 18 30 24 42 10 12 36
CODE
OUTPUT
Q47) WAP to enter N elements of integer type in a
list and rearrange the elements as per the following
if input list L1 contains
3 7 9 6 10 8 14 5 4 12
Then output list L2 should contain the following
3 7 9 5 12 4 14 8 10 6
CODE
OUTPUT
Q48) WAP to enter N elements of integer type in a
list and rearrange the elements as per the following
if input list L1 contains
3 7 9 6 10 8 14 5 4 12
Then output list L2 should contain the following
3 7 9 5 6 10 8 14 4 12
CODE
OUTPUT
Q49) WAP to enter N elements of integer type in a
list and rearrange the elements as per the following
if input list L1 contains
3 7 9 6 10 8 14 5 4 12
Then output list L1 should contain the following
7 9 5 6 10 8 14 4 12 3
CODE
OUTPUT
Q50) WAP to enter N elements of integer type in a
list and rearrange the elements as per the following
if input list L1 contains
3 7 9 6 10 8 14 5 4 12
Then output list L1 should contain the following
12 3 7 9 6 10 8 14 5 4
CODE
OUTPUT