Programming Problems Week 2 - Week 5 (1)
Programming Problems Week 2 - Week 5 (1)
Table of Contents
a. Requirement analysis...............................................................................................................3
b. Algorithm Design....................................................................................................................3
c. Evidence of Testing.................................................................................................................4
d. Reflection.................................................................................................................................5
a. Requirement analysis...............................................................................................................5
b. Algorithm Design....................................................................................................................5
c. Evidence of Testing.................................................................................................................6
d. Reflection.................................................................................................................................8
a. Requirement analysis...............................................................................................................8
b. Algorithm Design....................................................................................................................8
c. Evidence of Testing.................................................................................................................9
d. Reflection.................................................................................................................................9
a. Requirement analysis...............................................................................................................9
b. Algorithm Design..................................................................................................................10
c. Evidence of Testing...............................................................................................................10
3
d. Reflection...............................................................................................................................11
a. Requirement analysis.............................................................................................................11
b. Algorithm Design..................................................................................................................12
c. Evidence of Testing...............................................................................................................12
d. Reflection...............................................................................................................................13
Bibliography..................................................................................................................................14
4
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
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
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
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
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
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
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
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
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.
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
c. Evidence of Testing
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.
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
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
c. Evidence of Testing
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.
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
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
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
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
c. Evidence of Testing
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
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).
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:
Raposa, E. B., Rhodes, J., Stams, G. J. J., Card, N., Burton, S., Schwartz, S., ... & Hussain, S.
Journal of youth and adolescence, 48, 423-443. Retrieved from: The Effects of Youth
27 February 2023
Slowik, A., & Kwasnicka, H. (2020). Evolutionary algorithms and their applications to