Advertisement
Burrito33

Williams Psuedocode.

Mar 14th, 2023 (edited)
650
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Given they are thinking of hard drive (internal), register, compilation, interpretation
  2. BEGIN 'Software Akinator'
  3.     ASK 'Is it a component of a computer that can be physically touched?'
  4.         IF yes
  5.             ASK 'Is it an internal component?'
  6.                 IF yes
  7.                     ASK 'Is it a part of the Cpu?'
  8.                         IF yes
  9.                             ASK 'Is it a register ?'
  10.                                 IF yes
  11.                                     Display 'Gotcha'
  12.                                             ASK 'Do you want to play again?'
  13.                                                 IF yes
  14.                                                     RETURN TO 'Software Akinator'
  15.                                                 ELSE
  16.                                                     DISPLAY 'Thanks for playing'
  17.                                                     EXIT
  18.                         ELSE
  19.                             ASK 'Is it a Hard drive?'
  20.                                 IF yes
  21.                                     Display 'Gotcha'
  22.                                         ASK 'Do you want to play again?'
  23.                                             IF yes
  24.                                                 RETURN TO 'Software Akinator'
  25.                                         ELSE
  26.                                             DISPLAY 'Thanks for playing'
  27.                                             EXIT
  28.                                        
  29.         ELSE
  30.             ASK 'Is it software?'
  31.                 IF no
  32.                     ASK 'Is it a type of process?'
  33.                         IF yes     
  34.                             ASK 'Does it translate human-readable code to machine-executeable code?'
  35.                                 IF yes
  36.                                     ASK 'Is it compilation ?'
  37.                                         IF yes
  38.                                             Display 'Gotcha'
  39.                                                 ASK 'Do you want to play again?'
  40.                                                     IF yes
  41.                                                         RETURN TO 'Software Akinator'
  42.                                                     ELSE
  43.                                                         DISPLAY 'Thanks for playing'
  44.                                                         EXIT
  45.                                  ELSE
  46.                                      ASK 'Is it a Interpretation?'
  47.                                         Display 'Gotcha'
  48.                                             ASK 'Do you want to play again?'
  49.                                               IF yes
  50.                                                   RETURN TO 'Software Akinator'
  51.                                                     ELSE
  52.                                                         DISPLAY 'Thanks for playing'
  53.                                                         EXIT        
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement