0% found this document useful (0 votes)
16 views6 pages

Programming Fundamentals

The document outlines the examination details for various programs in the Faculty of Science and Technology, including module code, date, duration, and instructions for candidates. It specifies that the exam is open book, conducted on the V-class platform, and consists of compulsory questions with a total of 100 marks. The document also includes specific programming tasks and questions related to Python and C programming for students to complete.

Uploaded by

brianspartan304
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)
16 views6 pages

Programming Fundamentals

The document outlines the examination details for various programs in the Faculty of Science and Technology, including module code, date, duration, and instructions for candidates. It specifies that the exam is open book, conducted on the V-class platform, and consists of compulsory questions with a total of 100 marks. The document also includes specific programming tasks and questions related to Python and C programming for students to complete.

Uploaded by

brianspartan304
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/ 6

EXAMINATION

FACULTY OF SCIENCE AND TECHNOLOGY

PROGRAMME(S): BCS, BIT, BSF, DIT, BAV, DAV, BBC, BAE, BSE.

SESSION: DAY/EVENING
MODULE CODE AND TITLE: LEVEL:
1203 FST – Programming 1.1,1.2, 1.3, 2.1, 2.2, 2.3, 3.3
Fundamentals
DATE: TIME:
January, 2025

DURATION: TOTAL MARKS:


6 HOURS 100

EXAMINER/ LECTURER: MODERATOR:


Mr. Kasiita Tawfik Dr. David Kakeeto

INSTRUCTIONS TO THE CANDIDATE/ STUDENT


1. V-class is the ONLY official examination platform.
2. Questions must be attempted in the answer booklet/sheet provided on V-class.
3. All queries should be directed to the examiner, Head of Department, or Dean.
4. You have SIX HOURS to complete this paper. No exam answer sheet shall be accepted after the
6 hours (the system has closed).
5. This is an OPEN BOOK (Online) examination.
6. Attempt 4 Questions in total. All questions carry equal marks (25 marks each).
7. All questions are COMPULSORY
8. Read each question carefully before beginning to type/write your answers.
9. Review the grades assigned to each question of the examination and allocate your time
accordingly.
10. Review your answers carefully before submitting your examination.
11. After submitting your exam answer sheet, Cross-Check to ensure your examination was attached
and sent to V-class and received a confirmation message.
1|P age
SECTION A (Compulsory, avoid AI code)
QUESTION ONE

a) Write a python program to implement the table below with user input.
(07 Marks)

b) Write a C program that can sort HEP student ID numbers in collection


(06 Marks)

c) Write a python script to generate the form below using tkinter GUI library.
(12 Marks)

2|P age
QUESTION TWO

a) Describe the types of operators used in Qtn1 and why


(07 Marks)

b) Write a program to auto generate ID numbers for the BSF class students as per VU
standard (input – year and course)

(06 Marks)

c) Write a python program to generate a calculator layout below using tkinter GUI library.
(12 Marks)

3|P age
SECTION B (Attempt Only 2 Questions, avoid AI code)

QUESTION THREE

a) Write a program to implement a supermarket system follows.


▪ Input includes daily purchase stock cost, sales and employees
▪ Tax (1.5% of daily profits)
▪ Expenditure (Daily food and wages)
▪ Employees share 5% of daily profits
▪ A user should be able to enter up to 3 days’ data
▪ Program should not accept invalid input (sales and stock)
▪ Print savings for each day and total savings for 3 days.

(12 Marks)

b) Explain the difference between “is” and “==” operators with an example.
(06 Marks)

c) Define a python function, call it four different ways as below and only returns the
statement “[param 1] and [param 2] got married yesterday at the rooftop” if the arguments
are strings.
▪ function(2.5,3.4)
▪ function(2,3,4,5)
▪ function(“Adam Sandler”, ”Drew Barrymore”)
▪ function(False)
(07 Marks)

QUESTION FOUR

a) Write a program to implement a loan system follows.


▪ Input includes client name, loan amount and duration
▪ Each day interest is 1.5% of loan amount
▪ Amount payable (loan amount plus total interest)
▪ A user should be able to enter up to 3 clients’ data
▪ Program should not accept invalid input
▪ Print amount payable for each client and total profit.

(12 Marks)

b) What is the purpose of the break and continue statements within loops with an example.
4|P age
(06 Marks)

c) Define a python function, call it four different ways as below and only returns the sum if
the arguments are integers.
▪ function(2.5,3.4)
▪ function(2,3,4,5)
▪ function(“Adam Sandler”, ”Drew Barrymore”)
▪ function(False)
(07 Marks)

QUESTION FIVE

a) Write a program to implement a rental system follows.


▪ Input includes tenant name, amount paid and balance
▪ Tax (25% of each month’s payment)
▪ Each month costs 20000
▪ A user should be able to enter up to 3 tenants’ data
▪ Program should not accept invalid input (less than 1 month cost)
▪ Print months remaining for each tenant and balances if any

(12 Marks)

b) Explain the difference between positional arguments and keyword arguments with an
example.

(06 Marks)

c) Define a python function, call it four different ways as below, and only returns the whole
number value from division of [param1] by [param2] if the arguments are floats.
▪ function(2.5,3.4)
▪ function(2,3,4,5)
▪ function(“Adam Sandler”, ”Drew Barrymore”)
▪ function(False)
(07 Marks)

5|P age
QUESTION SIX

a) Write a program to implement a student system follows.


▪ Input includes name, course work, attendance and exams
▪ Coursework (25% - marked out of 30)
▪ Attendance (5% - marked out of 10)
▪ Exam (70% - marked out of 100)
▪ A user should be able to enter up to 3 students’ data
▪ Program should not accept invalid input (student marks)
▪ Print marks for each student and best performance

(12 Marks)

b) How does a “for loop” differ from a “while loop” with an example.
(06 Marks)

c) Define a python function, call it four different ways as below and only returns the average
of three random numbers if the arguments are Booleans.
▪ function(2.5,3.4)
▪ function(2,3,4,5)
▪ function(“Adam Sandler”, ”Drew Barrymore”)
▪ function(False)
(07 Marks)

6|P age

You might also like