NAME - SHANTANU SINGHA
SUBJECT -PYTHON PROGRAMMING LAB
PAPER CODE- BCAC493
UNIVERSITY ROLL NUMBER – 2340121222058
UNIVERSITY REG.NO-222341010056
COURSE-BCA
SEMESTER- 4th
ASSIGNMENT – PCA1
COLLEGE – MSHM COLLEGE OF MANAGEMENT AND
TECHNOLOGY(234)
1.Program to print “hello world”
print("hello world")
output-
2.#Program to print ASCII code for "A"
Output-
3.#Program to print character for the ascii value 97
Input-
Output-
4.#Program to print Current date time in local system
Input-
Output-
5.#Program to print upper case of "Python programing by Majid Mallik"
Input-
Output-
6.#Program to print type of 12,5.7 and 'Lecture Series on Python'
Input-
Output-
7.#Program to print length of "hello world" string
Input-
Output-
8.#Program to print "-" 100 times (without loop)
Input-
Output-
9.#Program to print 2 to the power 5
Input-
Output-
10.#Program to print memory location of any variable
Input –
Output-
11.#Program to take user-name as input, and print "hello {inputted-user-name}"
Input-
Output-
12.#Program to print ASCII code for inputted character
Input-
Output-
13.#Program to print character for any inputted ascii value
Input-
Output-
14.#Program to print reverse of the inputted string
Input-
Output-
15.#Program to print lower and upper case of inputted string
Input-
Output-
16.#Program to take comma separated city names and print them in sorted order
Input-
Output-
17.#Program to take comma separated city names and print only unique city names and in
sorted order.
Input-
Output-
18.#Program to take 3 integers as input , print their max,min and mean
Input-
Output-
19.#Program to print x to power n where x and n should be taken from user
Input-
Output-
20.#Program to take a floating point number n as input, print n round to 2 places
Input-
Output-
21. #Program to take perpendicular and base of a triangle from user and print it’s hypo
tenuse.
Input-
Output-
22. #Program to take radius of a circle from user and print it’s area and perimeter
Input-
Output-
23. #Program to find the Volume and surface area of a cuboid . sa= 2(lb+bh+hl)
Input-
Output-
24. #Program to take temperature in Fahrenheit from user and print it in Celsius. c = (f-
32)*5/9
Input-
Output-
25. #Program to calculate Simple Interest and Compound Interest. si = (p*r*t)/100 ; CI=
p*(1+r/100)^t
Input-
Output-
26.#Program to take a string, and if it starts with “a” or “A”, print it as a “valid input”
Input-
Output-
27. Program to take a string, and if it starts with a vowel, print it as a “valid input”am
Input-
Output-
28. Program to take a string, and if it starts and ends with the same character, print it as a
“valid input”
Input-
Output-
29. Program to take length and breadth from the user and print whether it is rectangle or
a square
Input-
Output-
30.Program to find whether a number is even or odd
Input-
Output-
31.Program to find whether a number is multiple of 13 or not
Input-
Output-
32. Program to take 3 angles from the user and print whether they are valid to make a
triangle or not
Input-
Output-
33.Program to check if the inputted number is positive, negative or zero
Input-
Output-
34. #Program to assign grade on the basis of marks ,
#grade A if marks >=80,
#grade B if marks >=60 and <80 ,
#grade C if marks >=50 and <60,
#otherise garde F
Input-
Output-
35.'''Program to apply tax
1,12,500+30% for annual salary exceeding 10 Lakh
12,500+20% for annual salary exceeding 5 Lakh
5% for annual salary exceeding 2.5 Lakh
Nil if annual salary under 2.5 Lakh'''
Input-
Output-
36. #Program to take a name as input from the user and print whether inputted name is a
file or a directory or not
Input-
Output-
37. #Program to input three angles and say whether they make obtuse, isosceles,
equilateral triangle or they didn't form a triangle.
Input-
Output-
38.Program to print type of all elements in the given list
Input-
Output-
39. #Program to print sum and average in the given list of integers
Input-
Output-
40. '''Program to print a list containing only those elements, which are less than 40 in the
given list'''
Input-
Output-
41. #Program to print a list containing only those elements, which are string in the given
list
Input-
Output-
42.Program to print all elements in the given list of strings with their reverse string
Input –
Output-
43. Program to print elements of the list in reversed order
Input-
Output-
44. #Program to print elements of the given list of integers in descending order
Input-
Output-
45.#Program to remove 17 from the list
Input-
Output-
46. #Program to print squares of the elements in the given list along with elements
Input-
Output-
47. #Program to count vowels in the inputted string and store their count in dictionary
Input-
Output-
48. #Program to print the square of first 10 natural numbers
Input-
Output-
16
25
36
49
64
81
100
49. .#Program to print the square of first 10 natural numbers
Input-
Output-
50.#Program to print even numbers between 32 to 57 in a single line
Input-
Output-
51. #Program to print sum of odd numbers between 1 to 20
Input-
Output-
52.Program to print multiplication table of an inputted number
Input-
Output-
Enter a number :6
6 x 1= 6
6 x 2= 12
6 x 3= 18
6 x 4= 24
6 x 5= 30
6 x 6= 36
6 x 7= 42
6 x 8= 48
6 x 9= 54
6 x 10= 60
53.Program to print factorial of an inputted number
Input-
Output-
54. # Program to check if a number is prime or not
Input-
Output-
55. To print fibonacci series of digits inputted by user10
Input-
Output-
56.print
####
####
####
####
Input-
Output-
57.print
##
###
####
Input-
Output-
58.print
####
###
##
#
Input-
Output-
59. #Program to find the largest of 3 numbers using function
Input-
Output-
60.Program to find the gcd of two numbers using function
Input-
Output-
61. Program to generate the Fibonacci series using function
Input-
Output-
62) Program to find the factorial of a no using function
Input-
Output-
63)
''' Program to swap to numbers
1) Using a third variable
2) without using third variable
3) using bitwise operator
4) using assignment operator
'''
Input-
Output-
64. Program to generate the Fibonacci series using recursion function
Input-
Output-
65) #Program to find the factorial of a no using recursion function
Input-
Output-
66. Program to find odd list from a list of numbers using filter function
Input-
Output-
67) Program to find the square root of all numbers from a list of numbers using map
function
Input-
Output-
68) Program to find the product of all numbers of a list using reduce function
Input-
Output-