100 PRINT “Hey! What’s your name?”
200 INPUT name$
300 IF name$ = “Jesenya” OR name$ = “jesenya” THEN GOTO 450
330 IF name$ = “Lev” OR name$ = “lev” THEN GOTO 480
400 PRINT “You have a nice name but you aren’t who I am looking for.
450 PRINT “You have such a beautiful name.”
460 GOTO 500
480 PRINT “YOU HAVE SUCH A TERRIBLE NAME”
500 PRINT “You have reached the end of the program.”
510 END
Advertisements
Line 330 is an example of a logical conditional. It works as a logical conditional because when tested in the code, if your name is not Lev or lev, it takes you to a completely different conclusion. Meaning a different line (480). A logical conditional has a hypothesis and a conclusion. For instance, following the form of IF there is a blizzard (hypothesis), THEN there is no school (conclusion).
LikeLiked by 1 person