Hi Everyone,
Hope you are doing well. in health and wealth.
anyway, just wanted to get some idea on the Initialization setup for Psuedocode.
If there are a couple of input requirements, should it be stated in the initialization section based on the sequence?
eg;
a program to calculate game platform, game price, payment method and maybe game type (physical/digital)
so should there be a sequence on which should be first in the initialization? will it be based on the flowchart process? if there is a gap between the requirement of input. does it mean that we need to split the initilization between process?
eg: select item ---> select item color ----> calculate price ----> apply discount ----> select location ----> calculate total cost. ---> select payment method ---End
so in the example above; the initialization is
Input Item
Input item color
Input location
Input payment method.
but since input location and payment method is not required in the earlier process (anything before calculating the prices process), should the initialization be split into 2 segments?
some like this.
Begin
Initialization
SET item_price = INPUT “Enter the item ”
SET color_tag = INPUT “Enter the item color tag (Blue, Red, Green,): ”
Calculate Price. ----> Apply discount
Initialization
Set location = INPUT "Location for delivery"
Set payment method = INPUT "payment method"
Or we can just prepare everything in the first initialization section without any issues?
Appreciate the help on this.
Thanks!!!
Pseudocode - Initialization understanding, requesting help - a noob in programming
Feb 18 2025, 03:28 PM, updated 11 months ago
Quote
0.0144sec
0.93
5 queries
GZIP Disabled