Posts

Showing posts from March, 2018

IF,THEN and ELSE

Image
Sequence  An instruction as shown bellow in the screenshot is not just the instruction but is set up as a sequence where the instruction/ instructions is set in a line of order that makes the most sense Selection IF- if the command code you write when you want a certain action to occur if so and so happens e.g. if person says hello A.I. reply's hello(if input name$ = "hello" then print "hello"). THEN- then is the command that follows the IF command where if the IF statement has been met THEN is the statement that follows up with an addition to the command or an end to it e.g. IF person says 'hello' THEN have A.I. replies with 'hello'. ELSE- else is the command where if the requirement of the IF statement is not met then a different action will occur e.g. IF  a person answers a question with the answer 'my favourite colour is blue' THEN reply with 'mine too' ELSE answer'that colours alright not my favourite thought...