UpGrad Python Practice Question
UpGrad Python Practice Question
Write a menu driven program that shows sort these array element in alphabetical
Write a program to accept a sentence
the working of a library. The menu option order.
from the user and reverse its each word.
should be Ques:7
Ques:13
--ADD BOOK INFORMATION Write a program to calculate the sum of
Write a program to calculate sum of
--DISPLAY BOOK INFORMATION digits of a given number.
elements of M*N matrix.
--LIST THE COUNT OF BOOKS IN THE Write a program to swap the values of two
Write a program to accept ‘n’ numbers
LIBRARY variables using Call by Reference.
from user and store these numbers into an
array and count the number of
--EXIT occurrences of each number.
Ques:15
upGrad
LOGIC UPGRADATION PROGRAM upGrad
Write a program to calculate X(Y+Z) . Write a program to create student Ques:24
structure having fields roll_no, stud_name,
Ques:16 mark1, mark2,mark3. Calculate the total Write a program to display the
and average of marks and arrange the multiplication table of a given number.
Write a Program to Accept character and
records in decending order of marks.
display its Ascii value and its Next and Ques:25
Previous Character. Ques:22
Write a program to display whether the
Ques:17 Write a program to accept Book Details o input character is a digit or alphabet.
f’n’ books as book_title,author, publisher
Write a Program to accept ‘n’ numbers Ques:26
and cost. Assign the accession number to
and store all prime numbers in an array
each book in increasing order Display Write a program to accept basic salary
and display the array.
thease details as . from user. If basic salary>=5000 then
Ques:18 hra=15% and da=150% of basic salary.
--Book s of a specific author
Write a program to calculate the x to the If basic salary<5000 then hra=10% and
--Books by a specific publisher
power y without using Standard functions. da=110% of basic salary .
--All Books costing rs 500 and above.
Ques:19 Display the Gross salary.
All Books.
Write a program to accept three sides of a
triangle as input and print whether the Ques:23
Trangle is valid or Not.
Write a menu driven program to perform
(The trangle is valid, if sum of each of the the following operations on string using
two sides is greater then the third side.) standard library functions
--Calculate length of string
Ques:20 --Reverse a given string
Write a program to accept string from the --Concatenation of one string to another
user and replace all occurrences of
character ‘a’ by ‘*’ symbol. --Copy one String into another
upGrad