Ruby Programming1-2Project Preview: The Ruby Joke Game
Ruby Programming1-3The Ruby Joke Game (continued)When the game is first started, the player is prompted for permission to begin telling jokes.Figure 1-1The player may elect to play the game or quit.
Ruby Programming1-4The Ruby Joke Game (continued)If players enter a value of n, they’re invited to return to play another time. If they enter a value of y, the game begins displaying jokes.Figure 1-2The player must press Enter to advance from screen to screen during game play.
Ruby Programming1-5The Ruby Joke Game (continued)In order to view the first joke’s punch line, the player must press the Enter key, after which the screen shown in Figure 1.3 displays.Figure 1-3The punch line for the game’s first joke.
Ruby Programming1-6The Ruby Joke Game (continued)To advance to and view successive jokes, the player must continue to press Enter. Once the final joke is told, the screen shown in Figure 1-4 displays.Figure 1-4The game ends by thanking the player.
Ruby Programming1-7A Brief History of Computers and Computer Programming
Ruby Programming1-8The First Generation•1937 to 1953 is regarded as being the first generation of electronic computer systems. •The British created Colossus in 1943 for breaking German military code in WWII.•THE U.S. created Electronic Numerical Integrator and Computer (ENIAC) for computing ballistics in WWII and later used it to perform calculations as part of the development of the hydrogen bomb.•The first computer programs were all written in machine language (machine code).