Python_Worksheet_Solved_with_Output
Python_Worksheet_Solved_with_Output
Q2 Output:
Enter your name: Aryan
Enter marks in English: 85
Enter marks in Maths: 90
Enter marks in Science: 80
Enter marks in Social Science: 75
Enter marks in Hindi: 70
My name is Aryan and my percentage is 80.0
Q3 Output:
Enter first number: 5
Enter second number: 10
Before swapping: x = 5 y = 10
After swapping: x = 10 y = 5
Q4 Output:
Enter any number: -3
Number is Negative
Q5 Output:
Enter your weight in kilograms: 70
Enter your height in meters: 1.75
Category: Normal
Q6 Output:
Enter length of rectangle: 5
Enter breadth of rectangle: 4
Enter side of square: 6
Enter 1 for rectangle or 2 for square: 1
Area of rectangle: 20
Q7 Output:
Enter any number: 5
Factorial of 5 is 120
Q8 Output:
Enter start of range: 1
Enter end of range: 10
Sum of even numbers: 30
Q9 Output:
Enter any number: 3452
Reverse of 3452 is 2543
Q10 Output:
Odd numbers between 10 and 100:
11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65
67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99
Q11 Output:
Enter a number: 6
Multiplication Table of 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
Q12 Output:
Enter a number: 13
13 is a prime number
Q13 Output:
Sum of the series is 145
Q14 Output:
Original list: [1, 9, 18, 56, 72, 39, 74]
Sum of elements: 269
List after updating 2nd element: [1, 4, 18, 56, 72, 39, 74]
Length of list: 7
Q15 Output:
How many numbers to enter: 5
Enter number: 45
Enter number: 12
Enter number: 78
Enter number: 32
Enter number: 67
Maximum element: 78
Minimum element: 12