Beruflich Dokumente
Kultur Dokumente
Date:
OUTPUT
Page no. Date:
OUTPUT
OUTPUT
Enter student's name: Sumit Pandey
Enter your class: 11
Enter your age: 16
Enter your number in five subjects:
Enter your marks in English: 58.5
Enter your marks in Physics: 38.5
Enter your marks in Chemistry: 56
Enter your marks in Computer-Science: 64
Enter your marks in Maths: 74
Average marks in five subjects: 78.64864864864865
Page no. Date:
OUTPUT
Page no. Date:
OUTPUT
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34
36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66
68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98
100
Page no. Date:
OUTPUT
*
**
* *
**
*
Page no. Date:
OUTPUT
Equation = 4x^2 + 6x +2
Enter the value of x: 5
Solution of the equation = 132
Page no. Date:
OUTPUT
Program for mean of a given list
Enter the numbers for list = 5,39,12,27
[5, 39, 12, 27]
Mean of the given list = 20.75
Page no. Date:
Page no. Date:
print("Result = ", a)
elif choice == 4:
a = num1/num2
print("Result = ", a)
OUTPUT
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Exponent
Enter your choice = 1
Enter the values
Enter the no. 1 = 286
Enter the no. 2 = 171
Result = 457
Page no. Date:
OUTPUT
Total distance = 450km
Enter the average speed in km/hr = 45
Total time taken = 10.0 hr
Page no. Date:
OUTPUT
Enter principle amount = 1000
Enter Rate = 5
Time period = 5 years
Simple Interest = 250.0
Page no. Date:
5. Write a python code to convert the time inputted in minutes into hours
and vice-versa.
OUTPUT
1. Convert minutes in hours
2, Convert hours in minutes
Enter your choice in number(1 or 2) = 1
Enter time in minutes = 180
Time in hours = 3.0 hr
Page no. Date:
6. Write a python code to swap the values of two variables a and b, using
multiple assignment statements.
a,b = 10,15
a,b = b,a
print(a)
print(b)
OUTPUT
15
10
Page no. Date:
break
else:
ctr+=1
if not ctr<5:
print("You losse :(\n The number was",number)
OUTPUT
Guess a number in range 10..50:5
Guess a number in range 10..50:27
Guess a number in range 10..50:12
Guess a number in range 10..50:39
Guess a number in range 10..50:50
You losse :(
The number was 47
Page no. Date:
Page no. Date:
Page no. Date:
Page no. Date:
Page no. Date:
Page no. Date: