0% found this document useful (0 votes)
7 views4 pages

Cie1 QP and Scheme

This document outlines the Continuous Internal Evaluation for the Introduction to Python Programming course at Jain College of Engineering for the academic year 2023-24. It includes a set of questions covering Python functions, loops, and data structures, along with programming tasks related to circles, dictionaries, Fibonacci sequences, and statistical calculations. The evaluation is structured to assess various course outcomes and program outcomes, with a maximum score of 25 marks.

Uploaded by

patilrajuc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Cie1 QP and Scheme

This document outlines the Continuous Internal Evaluation for the Introduction to Python Programming course at Jain College of Engineering for the academic year 2023-24. It includes a set of questions covering Python functions, loops, and data structures, along with programming tasks related to circles, dictionaries, Fibonacci sequences, and statistical calculations. The evaluation is structured to assess various course outcomes and program outcomes, with a maximum score of 25 marks.

Uploaded by

patilrajuc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

USN 2 J I

JAIN COLLEGE OF ENGINEERING, BELAGAVI


Department of Computer Science and Engineering
Academic year 2023-24
Continuous Internal Evaluation – 1 Class: II Semester ( A, B, C, D J div)
Course Name: Introduction to Python Programming Course Code: BPLCK205B
Maximum Marks: 25 Date: 24-04-2024 Duration: 60 Minutes
Note: Answer five questions.
Marks CO’s PO’s BCL

Q. 1. a What are functions? Explain Python functions with parameters and return 5 1 1, 2 2
statements.
OR
b Explain for loop and while loop with examples 5 1 1, 2 2
Q. 2. a Develop a Python program to calculate the circumference of a circle, and 5 1 1, 2 3
area of a circle.
OR
b Write a program that asks for a name and password and to validate the 5 1 1, 2 3
response (use while, break and continue statements).
Q. 3. a Explain negative indexing, index( ), sort( ), append( ), remove( ) with 5 2 1, 2 2
suitable examples.
OR
b Explain items( ), get() and setdefault() method in dictionary with 5 2 1, 2 2
examples.
Q. 4. a Write a program to create a dictionary of 10 key-value pairs and print only 5 2 1, 2 3
keys on the screen
OR
b Write a program to implement the magic -8 ball program using lists. 5 2 1, 2 3
Q. 5. a Develop a program to generate a Fibonacci sequence of length (N). Read 5 1 1, 2 3
N from the console.
OR
b Read N numbers from the console and create a list. Develop a program to 5 2 1, 2 3
print mean, variance and standard deviation with suitable messages.
* CO-Course Outcome * Program Outcomes *BCL-Bloom’s Cognitive Levels

Prepared by Scrutinized & Approved by HOD


Dr. R. C. Patil,

Dr. Vidya Dandagi

Prof. Vinayak Ratan,

Prof. Darshan Katgeri,

*******
JAIN COLLEGE OF ENGINEERING, BELAGAVI
Department of Computer Science and Engineering
Academic year 2023-24
Continuous Internal Evaluation – 1 Class: II Semester ( A, B, C, D, J div)
Course Name: Introduction to Python Programming Course Code: BPLCK205B
Maximum Marks: 25 Date: 24-04-2024 Duration: 60 Minutes

Scheme of Evaluation
Marks CO’s PO’s BCL

Q. 1. a What are functions? Explain Python functions with parameters and


return statements.
1 1, 2 2
Explanation of Functions 2
Explanation of parameters and return statement 3
OR
b Explain for loop and while loop with examples

For loop explanation with syntax 1


1 1, 2 2
For loop example 2
While loop explanation with syntax 1
While loop example 1
Q. 2. a Develop a Python program to calculate the circumference of a circle,
and area of a circle.

import math
radius = float(input("Enter the radius of the circle: ")) 5 1 1, 2 3
area = math.pi * radius**2
circumference = 2 * math.pi * radius
print(f"Area of the circle: {area}")
print(f"Circumference of the circle: {circumference}")
OR
b Write a program that asks for a name and password and to validate the
response (use while, break and continue statements).

while True:
print('Who are you?')
name = input()
if name != 'Joe': 5 1 1, 2 3
continue
print('Hello, Joe. What is the password?')
password = input()
if password == 'swordfish':
break
print('Access granted.')
Q. 3. a Explain negative indexing, index( ), sort( ), append( ), remove( ) with
suitable examples.
2 1, 2 2
1
Explanation of negative indexing, index( ), sort( ), append( ), remove( each
) with suitable examples
OR
b Explain items( ), get() and setdefault() method in dictionary with
examples.

Explanation of 2 1, 2 2
items( ), 1
get() 2
setdefault() 2
Q. 4. a Write a program to create a dictionary of 10 key-value pairs and print
only keys on the screen

d={}
for i in range(10):
k=input('Enter the key:')
if d.get(k,0)==0: 5 2 1, 2 3
v=input('Enter the value')
d[k]=v
else:
print('This key already exists in the Dictionary
with the value',d.get(k))
for k, v in d.items():
print(k)
OR
b Write a program to implement the magic -8 ball program using lists.

import random
messages = ['It is certain', 'It is decidedly so', 'Yes 5 2 1, 2 3
definitely', 'Reply hazy try again', 'Ask again later',
'Concentrate and ask again', 'My reply is no', 'Outlook
not so good', 'Very doubtful']
print(messages[random.randint(0, len(messages) - 1)])
Q. 5. a Develop a program to generate a Fibonacci sequence of length (N).
Read N from the console.

n = int(input("How many terms? "))


n1, n2 = 0, 1
count = 0
if n <= 0:
print("Please enter a positive integer")
elif n == 1:
print("Fibonacci sequence of length",n,":") 5 1 1, 2 3
print(n1)
else:
print("Fibonacci sequence of length",n,":")
while count < n:
print(n1)
nth = n1 + n2
# update values
n1 = n2
n2 = nth
count += 1
OR
b Read N numbers from the console and create a list. Develop a program
to print mean, variance and standard deviation with suitable messages.

import math

def mean(arr,n):
sum = 0
for i in range(0 ,n):
sum += arr[i]
mean = sum /n 5 2 1, 2 3
return mean

def variance(a, n):


avg=mean(arr,n)
sqDiff = 0
for i in range(0 ,n):
sqDiff += ((a[i] - avg) * (a[i] - avg))
return sqDiff / n

def standardDeviation(arr, n):


return math.sqrt(variance(arr, n))

# Driver Code
n=int(input("Enter the length of the array: "))
arr=[]
for i in range(n):
arr.append(int(input("Enter the number: ")))

print('Entered array of numbers: ',arr)


print('The Mean value of the list is: ',mean(arr,n))
print("Variance: ", int(variance(arr, n)))
print("Standard Deviation: ",
round(standardDeviation(arr, n), 3))

* CO-Course Outcome * Program Outcomes *BCL-Bloom’s Cognitive Levels

Prepared by Scrutinized & Approved by HOD


Dr. R. C. Patil,

Dr. Vidya Dandagi

Prof. Vinayak Ratan,

Prof. Darshan Katgeri,

*******

You might also like