You are on page 1of 6

MID TERM ASSESSMENT – DECISION MAKING TOOLS

Instructions:
 All the answers should be handwritten, Attach the pictures in word document.
 Paper Timings: 10:15 – 12:30
 Note that actual paper timing is 90 Mins. Extra Time is already included in the paper timings:
15mins extra are given in start for understanding questions and 30mins extra at end for
submitting the pictures / answers properly (No more extra time will be given).
 Any paper submitted after 12:30 will be forwarded to exam department for approval.
 Code should not be copied from any source.
 All students whose code is found similar/copied will be awarded zero.
 Remember to click Turn In / Hand In after uploading the exam.
 Total Marks are 30.

PART A: Write the expected output of the code. (1*10 = 10 Marks)


Question1:

Question2:

Question3:
Question4:

Question5:

Question6:

Question7:
Question8:

Question9:

Take the input number as


Input a Number: 5

Question10:

PART B: Identify and resolve errors in following code. (1*10=10 Marks)


Question11:

Question12:
Question 13:

Question 14:

Question15:

Question16:
Question17:

Question18:

Question19:

Question20:

PART C: Write program for following questions. (2.5*4 = 10 Marks)


Question21: Write a program to get two numbers from user. If both numbers are even add them and
print and if both numbers are odd multiply them and print and if one is even / one is odd subtract
them and print.

Question22: Write a program to take the values from below list and add it to new dictionary using
for loop. Keys of dictionaries are 1,2,3,4. Print the new dictionary as well.

Marks = [15,24,67,80]
Expected New Dictionary = {1: 15, 2: 24, 3: 67, 4: 80}

Question23: Write a program to print the table of a number that is “1 greater” than the input
number. For example if the input number is 4, the table of 5 would be printed. Similarly if the input is
6, the table of 7 would be printed. Print the table up to 10. (like 2*1 = 2, 2*2 = 4, …. , 2*10 =20)

Question24: Write a program which takes input the age of the user (in years) and converts into
months and days using functions. Print out days and months.
Expected output:
Enter your age in years: 31
Your age in Months is: 372
Your age in Days is: 11315

You might also like