0% found this document useful (0 votes)
28 views5 pages

Coding Contest

The document outlines a Python programming test consisting of theory and practical coding sections, totaling 60 marks. Part A includes fill-in-the-blanks, true/false statements, and multiple-choice questions, while Part B consists of coding tasks related to a grading system, loan eligibility, fitness tracker, and smart traffic light. Students are instructed to read questions carefully and ensure their code is implemented and tested correctly.

Uploaded by

dipak61
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)
28 views5 pages

Coding Contest

The document outlines a Python programming test consisting of theory and practical coding sections, totaling 60 marks. Part A includes fill-in-the-blanks, true/false statements, and multiple-choice questions, while Part B consists of coding tasks related to a grading system, loan eligibility, fitness tracker, and smart traffic light. Students are instructed to read questions carefully and ensure their code is implemented and tested correctly.

Uploaded by

dipak61
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

CODING

CONTEST
Coding Wise
Python Programming Test (60 Marks)

Instructions for Students:

● Read each question carefully.


● Answer all questions in the space provided.
● Each theory question carries 1 mark.
● Ensure coding questions are correctly implemented and tested.

Part A: Theory (30 Marks)


]\

1. Fill in the Blanks (10 Marks)

● Each question is worth 1 mark.


● The ____ statement is used for decision-making in Python.
● A ____ in Python is a sequence of characters.
● ____ is used to add comments in Python code.
● The symbol ____ is used for exponentiation in Python.
● A ____ loop in Python allows you to repeat code.
● Python uses ____ and ____ as Boolean data types.
● ____ is used to store multiple items in a single variable in Python.
● The ____ operator is used to check equality in Python.
● Python scripts typically have the ____ file extension.
● ____ is the keyword for defining a function in Python.

2. True/False (10 Marks)

● Each statement is worth 1 mark.


● In Python, variable names are case sensitive. (True/False)
● Python supports automatic garbage collection. (True/False)
● Lists in Python are immutable. (True/False)
● The print() function in Python is used to output data. (True/False)
● In Python, '==' compares the value of two objects. (True/False)
● Python can be used for mobile app development. (True/False)
● Tuples in Python can be changed after they are created. (True/False)
● Python is not suitable for data analysis. (True/False)
● Python was created by Guido van Rossum. (True/False)

3. Multiple Choice Questions (MCQs) (10 Marks)

● Each question is worth 5 mark.


What is the output of print(8 % 3)?

1
]\

a) 2
b) 2.67
c) 3
d) 5

Which of these is a correct variable declaration in Python?


a) python_var = 1
b) 1_python_var = 1
c) python-var = 1
d) python?var = 1

Part B: Practical Coding (30


Marks)
Coding Question 3: Grading System(10M)
Task: Develop a program that calculates the final grade of a student based on
their marks. The grading system is as follows:
● Below 50: Fail
● 50 to 59: Pass
● 60 to 69: Good
● 70 to 79: Very Good
● 80 to 89: Excellent
● 90 and above: Outstanding
Input Format: The program should prompt the user to enter the student's
marks as a single integer.

2
]\

Output Format: The program should print the grade (e.g., "Fail", "Pass", "Good",
"Very Good", "Excellent", "Outstanding").
Example:
● Input: 76
● Output: Very Good

Coding Question 4: Loan Eligibility System(10M)


Task: Write a program to determine if an applicant is eligible for a loan. The
eligibility criteria are based on age, annual income, and employment type
(salaried or self-employed).
● Age must be between 22 and 60.
● Minimum annual income of $30,000.
● Salaried applicants are eligible with the minimum criteria, but
self-employed applicants need a minimum annual income of $40,000.
Input Format: The program should ask for the applicant's age, annual income,
and employment type.
Output Format: The program should print "Eligible for loan" or "Not eligible
for loan".
Example:
● Input: Age = 30, Income = 35000, Employment Type = Salaried
● Output: Eligible for loan

3. Harder Coding Question (10 Marks)

Question 1: Fitness Tracker (5M)


Scenario: You're developing a fitness tracker app that recommends daily activity levels
based on steps taken.

3
]\

Problem: Write a program that gives recommendations based on the number of steps
input:
● Below 5,000 steps: "Try to be more active."
● Between 5,000 and 10,000 steps: "Good job on staying active!"
● Above 10,000 steps: "Great work! You're leading a very active lifestyle."
Example Input-Output:
● Input: 7000
● Output: "Good job on staying active!"

Question 2: Smart Traffic Light(5M)


(Scenario: You're programming a smart traffic light that changes its operation based on
the time of day and traffic conditions.
Problem: Write a program that decides the traffic light behavior:
● During rush hour (7-9 AM, 5-7 PM), if the traffic is heavy, the light stays green for
2 minutes; otherwise, 1 minute.
● Outside rush hour, if the traffic is heavy, the light stays green for 1.5 minutes;
otherwise, 45 seconds.
Example Input-Output:
● Input: Time = "18:00", Traffic = "heavy"
● Output: "Green light duration: 2 minutes.

Each coding question should be answered with careful consideration of the input and
output formats, ensuring that the code runs as expected for various inputs.

NOTE- CODE COPIED FROM CHATGPT CAN BE SCANNED BY OUR SCRIPT DO BY


YOURSELF

Best of Luck My Dear Coder

You might also like