You are on page 1of 1

ANNA UNIVERSITY

MIT CAMPUS
B.TECH - RUBBER & PLASTICS TECHNOLOGY
GE 5161 - PROBLEM SOLVING AND PYTHON PROGRAMMING
LABORATORYENDSEMTER LAB EXAM –JULY 2023
DATE: 26/07/2023 MARKS: 100 DURATION: 2 Hours 30 Minutes
REG NO:
RANDOM NUMBER ALLOTED:
Write Algorithm/Pseudo code and draw flow chart for calculating the result of sine series.
A1 Sin(x) = (x^1 / 1!) – (x^3 / 3!) + (x^5 / 5!) - ….. 25

Write a python to read the number until -1 is encountered. Also calculate the sum
A2 and mean of all positive numbers entered and the sum and mean of all negative 25
numbers entered separately using loop.
Write a function to find the maximum number in a given number, for example if a
number 3496 is passed the maximum number is 9.

A3 Using this function, write a program to read 'n' numbers and add only maximum 25
number from each number.

For example, n=3 and 1256, 671, 111 are the numbers given then the result should
be (6+7+1=14)
A4 Write a program to create 2 lists which contain numbers. First check whether both
the list contains same number of elements. If so, create a new list by adding the
first element in list1 and last element in list2, second element from list1 and
element before last element in list 2. If number of elements is different give
appropriate message.
25
Example:

List1=[1,2,3,4]
List2=[5,2,6,7]
newList=[8,8,5,9]

You might also like