Thursday, April 30, 2020

Software Lab Based on Python:

Section: A ( Simple programs) 1. Write a menu driven program to convert the given temperature from Fahrenheit to Celsius and vice versa depending upon users choice. 2. WAP to calculate total marks, percentage and grade of a student. Marks obtained in each of the three subjects are to be input by the user. Assign grades according to the following criteria : Grade A: Percentage >=80 Grade B: Percentage>=70 and <80 Grade C: Percentage>=60 and <70 Grade D: Percentage>=40 and <60 Grade E: Percentage<40 3. Write a menu-driven program, using user-defined functions to find the area of rectangle, square, circle and triangle by accepting suitable input paramters from user. 4. WAP to display the first n terms of Fibonacci series. 5. WAP to find factorial of the given number. 6. WAP to find sum of the following series for n terms: 1 – 2/2! + 3/3! - - - - - n/n! 7. WAP to calculate the sum and product of two compatible matrices.
Section: B (Visual Python):
All the programs should be written using user defined functions, wherever possible.
1. Write a menu-driven program to create mathematical 3D objects I. curve
II. sphere III. cone IV. arrow V. ring VI. cylinder. 2. WAP to read n integers and display them as a histogram. 3. WAP to display sine, cosine, polynomial and exponential curves.
4. WAP to plot a graph of people with pulse rate p vs. height h. The values of p and h are to be entered by the user. 5. WAP to calculate the mass m in a chemical reaction. The mass m (in gms) disintegrates according to the formula m=60/(t+2), where t is the time in hours. Sketch a graph for t vs. m, where t>=0. 6. A population of 1000 bacteria is introduced into a nutrient medium. The population p grows as follows: P(t) = (15000(1+t))/(15+ e) where the time t is measured in hours. WAP to determine the size of the population at given time t and plot a graph for P vs t for the specified time interval. 7. Input initial velocity and acceleration, and plot the following graphs depicting equations of motion: I. velocity wrt time (v=u+at) II. distance wrt time ( s=u*t+0.5*a*t*t) III. distance wrt velocity ( s=(v*v-u*u)/2*a ) 8. WAP to show a ball bouncing between 2 walls. (Optional)

No comments:

Post a Comment