Category | Assignment | Subject | Programming |
---|---|---|---|
University | Singapore University of Social Sciences (SUSS) | Module Title | ICT133 Structured Programming |
Academic Year | 2025-26 |
---|
This assignment is worth 24% of the final mark for ICT133, Structured Programming.
The cut-off date for this assignment is Sunday, 12 October 2025, 2355 hours.
This question covers materials in Seminar 1 and 2. Use and express selection structure for this question. Functions, repetition, or collections are not necessary for this question.
(a) Write a program to find the colour of square X on a board with colour patterns. Your program will ask a user to input the size of the board, which can be any odd integer from 3 to 9 inclusive. Imagine 2 diagonal lines cutting across the board with no colours. The top triangle with be Green, bottom Red, left Yellow and right Blue. A size 7 board example is shown below.
The program will ask the user for the row and column numbers of square X. Column numbers start from 1 and run from left to right. Row numbers start from 1 and run from top to bottom. If X falls on the diagonals, the program shall print ‘No colour’, else it shall print the colour of square X. The program shall do error checking on size, row, column numbers and not ask the user for unnecessary inputs if the previous input already failed the check. Sample runs are given below. Submit and paste screenshots of at least FOUR program executions, with different inputs.
(b) The pattern of the board has been changed to the type below. Write a program to ask a user to input the size of the board, which now must be an even integer from 4 to 10 inclusive. The program will ask the user for the row and column numbers of square X and print out the colour of square X or ‘No colour’ if it falls within the central white space. Submit and paste screenshots of at least FOUR program executions, with different inputs.
Stuck Your ICT133 TMA Assignment? Deadlines Are Near?
Hire Assignment Helper Now!This question covers materials up to Seminar 3. Make use of functions, selection and repetition structures. NO data structures like sets, lists or dictionary should be used for this question. The eval() function should not be used. Keep the program modular by defining other functions if necessary.
(a) Make changes to the answer to 1(b) above and convert it into a function that receives input via its input parameters and return the result via its return values. Write a function getColour(size, row, col) which takes in 3 integer parameters containing the size of the board, row and column numbers of square X. The function returns a single character value that represents the colour of square X: ‘G’, ‘B’, ‘R’, ‘Y’, ‘-‘ for Green, Blue, Red, Yellow and no colour respectively. If an error occurred, return an error message string that starts with ‘E’.
For example,
(b) Making use of the function defined in part (a), write a program that will ask a user to input the size of the board, which must be an even integer from 4 to 10 inclusive, and prints out the board using characters to represent the colours. Sample runs are given below. Submit and paste screenshots of at least FOUR program executions, with different inputs.
(c) Enhance the above to print out a board where rings of numbers cover the region with no colours, starting with 1 at the outermost ring and increasing by 1 as it moves towards the centre. Sample runs are given below. NO data structures like sets, lists or dictionaries should be used. Submit and paste screenshots of at least FOUR program executions, with different inputs.
This question covers materials up to seminar 4. Employ structure programming and use of functions to make the program modular.
Write a multi-player game where everyone starts with a score of 501 points, with the aim of deducting it to 0 points within the least number of turns.
For example,
o Player’s current score is 16
o Player chose 8 as the hit points
o Program randomly chose a multiplier of 3
o If deducted, the score will be negative, i.e. 16 – 8*3 = -8, which is a bust
This question covers materials up to seminar 4. Employ structure programming and use of functions to make the program modular. Silver Screen is a cinema operator looking for a simple application to help them manage seat bookings.
(a) Write a menu-driven application to manage the seat booking process. The application will first ask the user to input the number of rows and the number of seats per row to initialize a seating plan as a nested list. This nested list shall consist of a list of rows where each row is a list of seats. For example, the initial seating plan of the above cinema is represented by the nested list below.
(b) Enhance the above application with a new option to auto select the best seats to book. With this option, the user will only need to input the number of seats required and the application will find the best seats to book. It will start from the last row and work forward towards the screen. In each row, it will try to find available seats as close to the centre of the row as possible. Selected seats should form a continuous row that has the required number of seats. The seats cannot span multiple rows and cannot have gaps in between seats.
Buy Custom Answer Of ICT133 TMA Assignment & Raise Your Grades
Get A Free QuoteAre you stuck on ICT133 Structured Programming TMA Assignment? So now you can be stress free as you have reached the right place and here our expert team is providing you programming assignment help services. Look no further, we are available 24/7 to help you, so now be stress free and focus on studies. If you want solutions then we also provide free assignment samples that will help you clear your concepts. Contact us today and increase your academic grades with SG Assignment Help!
Let's Book Your Work with Our Expert and Get High-Quality Content