Pseudocode is a way for a programmer to visualize there code, this can be used for a variety of reasons like helping them to plan out an algorithm before they actually start to code or they can use it to show to their client so that they have an understanding of how the code works.
For this example of Pseudocode for a test to see if the user knows how to look after their Mogwai from the movie gremlins. At the top it gives a description of what the code is designed to do and the first bit of code is designed to take the user from the welcome screen to the first question one they click enter. After they click enter they are given two statements using print, one true and one false about looking after your mogwai. Using an IF statement i had it so if the user selected the wrong answer it would tell them they are wrong and the ELSE was giving them the option to go to the next question, i repeated this with the other two rules and on the last one using the IF statement if they got it correct it would take them to a "Well done you answer 3/3 correctly" and if not it would display "wrong enjoy death".
댓글