0% found this document useful (0 votes)
6 views

Programming Problems Week 2 - Week 5 (1)

The document outlines a series of programming challenge activities over six weeks, focusing on requirement analysis, algorithm design, evidence of testing, and reflections for each week. Each week includes tasks related to developing GUI applications using Python, implementing various functionalities such as population calculations, profit calculators, and quiz mark summations. The document emphasizes the importance of structured analysis and pseudocode in successfully developing programming solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Programming Problems Week 2 - Week 5 (1)

The document outlines a series of programming challenge activities over six weeks, focusing on requirement analysis, algorithm design, evidence of testing, and reflections for each week. Each week includes tasks related to developing GUI applications using Python, implementing various functionalities such as population calculations, profit calculators, and quiz mark summations. The document emphasizes the importance of structured analysis and pseudocode in successfully developing programming solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

PROGRAMMING PROBLEMS

Table of Contents

Week 2 Challenge Activities...........................................................................................................3

a. Requirement analysis...............................................................................................................3

b. Algorithm Design....................................................................................................................3

c. Evidence of Testing.................................................................................................................4

d. Reflection.................................................................................................................................5

Week 3 Challenge Activities...........................................................................................................5

a. Requirement analysis...............................................................................................................5

b. Algorithm Design....................................................................................................................5

c. Evidence of Testing.................................................................................................................6

d. Reflection.................................................................................................................................8

Week 4 Challenge Activities...........................................................................................................8

a. Requirement analysis...............................................................................................................8

b. Algorithm Design....................................................................................................................8

c. Evidence of Testing.................................................................................................................9

d. Reflection.................................................................................................................................9

4. Week 5 Challenge Activities.......................................................................................................9

a. Requirement analysis...............................................................................................................9

b. Algorithm Design..................................................................................................................10

c. Evidence of Testing...............................................................................................................10
3

d. Reflection...............................................................................................................................11

5. Week 6 Challenge activities......................................................................................................11

a. Requirement analysis.............................................................................................................11

b. Algorithm Design..................................................................................................................12

c. Evidence of Testing...............................................................................................................12

d. Reflection...............................................................................................................................13

Bibliography..................................................................................................................................14
4

Week 2 Challenge Activities

a. Requirement analysis

It has been observed that the assignment illustrates different problems and is needed to be

performed with the help of “python programming language”. This part of the project signifies

the requirements and the possibilities of how the problems get resolved and are known to have

implemented the Pseudocodes in “Jupyter notebook”.

The program needs to be performed with the help of Python using a GUI interface. The program

needs to calculate the population for each year in the GUI interface. The program must update

the population variable and should run for the next five years along with its display for each

year.

b. Algorithm Design

The first step of the pseudocode involves defining the initial population, birth rate, and

other parameters and helps in calculating the new population for each year. The second step of

the pseudocode involves the use of a GUI interface for the purpose of the display of the

population every year. The third step contains a button to calculate the population for next year.
5

c. Evidence of Testing

Figure 1: Evidence of the codes

(Source: Acquired from Jupyter Notebook)

It appears that codes have been written in terms of creating the GUI application that can

display the population for each of the next five years. In terms of creating the GUI, tkinter

module has been required to be used in this case.

Figure 2: Output of the GUI

(Source: Acquired from Jupyter Notebook)


6

Based on the instruction, a GUI has been created that displays the population in the next

five years. In that case, the initial population ratio has been considered as Austrellia’s, and based

on that it has displayed the possible population ratio in the next five years.

d. Reflection

I have learned that this analysis provides a wide overview of the requirements, algorithm

design, and pseudocode for developing the algorithm using a GUI interface. The analysis is clear

and well-structured, providing a useful reference for developing the program.

Week 3 Challenge Activities

a. Requirement analysis

It has been known in order to tackle the problem the GUI must be developed in activity 1

using the Tkinter library in python. The other requirement is that in activity 2, the program

should use the functions to display the profit calculator. It comes into consideration that the

program must validate the input to ensure that the user has entered valid data in each field.

b. Algorithm Design

The first step of the pseudocode involves importing the “Tkinter” module. The next step

includes defining the class of “StudentInfo” that has been taken into consideration. The next step

of the pseudocode is to create labels to display the output values. For the purpose to display the

window the “mainloop()” method is needed to be called. The second part of the activity

generates the profit calculator while the third part figures out a pound-to-kilogram converter. In

activity 4 turtle graphic pattern generator proceeded with the help of Python language.
7

c. Evidence of Testing

Figure 3: Challenge activity 1

(Source: Acquired from Jupyter Notebook)

In this activity, it has been instructed to create a GUI that can display the information of

the student based on their given input. The snip that has been attached above reflects that the

required activity has been performed according to the instruction.

Figure 4: Challenge activity 2

(Source: Acquired from Jupyter Notebook)

In this activity, it has been asked to display the amount of profit earned by the company

after entering the sales amount of the company. On the basis of the image that has been attached
8

above it can be said that profit has been calculated based on the input given in the total sales

section which resulted in 575 dollars.

Figure 5: Challenge activity 3

(Source: Acquired from Jupyter Notebook)

During this activity, it has been asked to create a GUI that converts weights from pounds

to kgs. Following that, instructions, the above-pasted outcome appeared during the program that

converts weights from pound to kg.

Figure 6: Challenge activity 4

(Source: Acquired from Jupyter Notebook)

In this stage of the weekly activity, a certain diagram has been provided based on that it

has been asked to develop a diagram similar to that. The above-attached diagram is the reflection

of the output that has been obtained by using the turtle module in python.
9

d. Reflection

I have learned that the above analysis provides a clear and concise outline of the

requirements for the Python program. The program requires a Graphical User Interface (GUI)

that allows the user to input and display student information. I have also learned that the

algorithm design provides a step-by-step plan for implementing the program. I agree with the

point that requirement analysis is very important to pursue any sort of problem before the final

implementation.

Week 4 Challenge Activities

a. Requirement analysis

The requirement analysis includes the input, processing, and output to be properly

planned before the final implementation. It has been noticed that error handling, user interface,

efficiency, portability, and documentation are the key role that includes the success of the

problem.

b. Algorithm Design

The first step of the algorithm design of the pseudocode is that it prompts the user to

enter the quiz mark for quiz 1. The next step involves reading and saving the quiz mark as an

integer. This process continues till quiz 4 and then the calculation process involves summing the

quiz marks. The display is the very next step that falls after these steps and includes the overview

of the summation of 4 quiz marks on the console.


10

c. Evidence of Testing

Figure 7: Challenge activity 1

(Source: Acquired from Jupyter Notebook)

In this stage of the assignment, it has been instructed to develop a GUI that can calculate

the total number of marks in the quiz obtained by the student out of 10. The above-pasted snip is

the evidence of the output that has been obtained after performing the activity.

d. Reflection

I have learned that the above analysis provides a clear and concise description of the

requirements for a console interface program that calculates the quiz mark for the ST1 unit. The

pseudocode provided is straightforward and easy to follow and can be easily implemented in any

programming language. I have known that the implementation in Python demonstrates how the

program would work in practice, and shows how the requirements are met through the use of

code.

4. Week 5 Challenge Activities


a. Requirement analysis

The program in activity 1 needs a GUI interface to prompt the user for the number of laps

they've run and then loop through prompts for the time of each lap. The program should then

calculate and display the fastest, slowest, and average lap times based on the user's inputs. The
11

requirement analysis in activity 2 needs a GUI program that allows members to input their daily

fat and carbohydrate intake, and the program will calculate the calories from fat and

carbohydrates using specific formulas. The program should be user-friendly and easy to navigate

for members of the fitness club.

b. Algorithm Design

The first step of the pseudocode in challenge activity 1 is to prompt the number of laps.

The next step involves looping through prompts for lap times and storing them in an array. The

very next step involves calculating the average lap times using array methods. The steps that

come after this part are to display the result in the GUI interface.

The first step in activity 2 of the pseudocode includes displaying the user interface with

input fields for fat and carbohydrate grams. The next step involves inputting values for fat and

carbohydrate grams. The step that comes after this process is to calculate calories from fat by

multiplying fat grams by 3.9 and assign to the variable. The final step involves displaying

calculated values for calories from fat and carbohydrates.

c. Evidence of Testing

Figure 8: Challenge activity 1

(Source: Acquired from Jupyter Notebook)


12

Based on the above-pasted output it appears that a GUI has been created that takes the

number of laps and their timings as input. Then, it calculates the fastest, slowest and average lap

time accordingly.

Figure 9: Challenge activity 2

(Source: Acquired from Jupyter Notebook)

On the basis of the above-attached output, it is evident that a GUI for a nutritional

calculator has been created. This calculator estimates the number of calories that can be obtained

from a certain amount of fat and carbohydrates.

d. Reflection

I have known that this part figures out a detailed analysis of the program requirements

and algorithm design. I have learned that this analysis requires specific requirements and

pseudocode for product development and running the program successfully.

5. Week 6 Challenge activities

a. Requirement analysis

In the first part of the activity, the GUI program is needed to calculate stadium ticket

income for each category. The second part of the activity requires turtle graphics for the city

skyline along with building outlines.


13

b. Algorithm Design

In the first part of the activity, the pseudocode asks users for ticket quantities and is

known to calculate and display income. The second part requires drawing buildings to meet up

all the requirements in order to complete the project.

c. Evidence of Testing

Figure 10: Challenge activity 1

(Source: Acquired from Jupyter Notebook)

This activity has been performed in terms of displaying the total amount of income that

has been obtained after selling the different class tickets of a stadium. In case of doing that, a

GUI has been created that has been done with the assistance of tkinter module.
14

Figure 11: Challenge activity 2

(Source: Acquired from Jupyter Notebook)

In this activity, it has been asked to perform a drawing with the assistance of the turtle

module. In the case of doing that, three different criteria have been kept in mind. In order to be

precise, it can be said that the outline of the building has been drawn along with the windows as

well. Apart from that, it can also be noted that stars have also been drawn that do not appear on

the building.

d. Reflection

I have known that the first activity needs clear and concise requirements for the purpose

to design the algorithm. The pseudocode that has been used in the second part of the activity is

simple, and effective that implies the actual implementation of the program.
15

Reference:

Fuller, E. J., Keene, S. T., Melianas, A., Wang, Z., Agarwal, S., Li, Y., ... & Talin, A. A. (2019).

Parallel programming of an ionic floating-gate memory array for scalable neuromorphic

computing. Science, 364(6440), 570-574. Retrieved from: Parallel programming of an

ionic floating-gate memory array for scalable neuromorphic computing | Science

accessed on: 27 February 2023

Liu, S., Li, Z., Zhang, Y., & Cheng, X. (2019). Introduction of key problems in long-distance

learning and training. Mobile Networks and Applications, 24, 1-4. Retrieved from:

Introduction of Key Problems in Long-Distance Learning and Training | SpringerLink

accessed on: 27 February 2023

Raposa, E. B., Rhodes, J., Stams, G. J. J., Card, N., Burton, S., Schwartz, S., ... & Hussain, S.

(2019). The effects of youth mentoring programs: A meta-analysis of outcome studies.

Journal of youth and adolescence, 48, 423-443. Retrieved from: The Effects of Youth

Mentoring Programs: A Meta-analysis of Outcome Studies | SpringerLink accessed on:

27 February 2023

Slowik, A., & Kwasnicka, H. (2020). Evolutionary algorithms and their applications to

engineering problems. Neural Computing and Applications, 32, 12363-12379. Retrieved

from: Evolutionary algorithms and their applications to engineering problems |

SpringerLink accessed on: 27 February 2023


16

You might also like