I’m not a experienced programmer (yet), but I’m applying to a school that has several coding courses.
In the entrance examination however, there may be solvable problems that must be written in pseudocode or as flow charts. Somewhat I handle the flow charts, but I’m having a hard time making the pseudocode look good.
For example, I tried to write a pseudocode for a program that scans 24 temperature readings and prints out MIN, MAX and AVG, but I don’t think I did so well. I got this far, but didn’t get the AVG in:
max = 0 min = 0 set up array of a[24] loop start if a[x] > max
max = a[x]
else if a[x] < min
min = a[x]
print Max temp: print Min temp:
I would like to see how you guys would construct a clear pseudocode of this program.
Smaller statements tend to be better. I’d rewrite your provided snippet as:
It’s almost real python code. The following is real python code: