Python Programming Lab Pca1
Python Programming Lab Pca1
Output-
Output-
Output-
Output-
6.#Program to print type of 12,5.7 and 'Lecture Series on Python'
Input-
Output-
Output-
Output-
Output-
10.#Program to print memory location of any variable
Input –
Output-
Output-
Output-
Output-
14.#Program to print reverse of the inputted string
Input-
Output-
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-
Output-
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-
Output-
Output-
32. Program to take 3 angles from the user and print whether they are valid to make a
triangle or not
Input-
Output-
Output-
Output-
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-
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-
Output-
44. #Program to print elements of the given list of integers in descending order
Input-
Output-
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-
Output-
16
25
36
49
64
81
100
Output-
Output-
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
Output-
Output-
56.print
####
####
####
####
Input-
Output-
57.print
##
###
####
Input-
Output-
58.print
####
###
##
#
Input-
Output-
Output-
60.Program to find the gcd of two numbers using function
Input-
Output-
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-
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-