top of page

~Fundamental Product Programming Skills (Conditional Statements)~

Writer's picture: ArchieArchie

In programming, there are a list of keywords called Conditional Statements. Conditional Statements allow tasks to perform ONLY when certain conditions are met.


'if' statements

'if' statements allow a certain task to happen only if certain requirement is met. For example, if you only wanted the print command to print 'the value is ten' when the value is actually ten, you're able to make this happen using an 'if' statement.


'else' statements

'else' statements allow a certain task to happen if it doesn't first fit inside any other requirement. For example, if you wanted to print a message saying 'you have to choose one of the lists requirements' if they chose none, use an 'Else' statement.


'while' statements

'while' statements allow a certain task to happen whilst it meets the condition. For example, if you wanted the music in a game to get more dramatic whist below a certain level of health, use a 'while' statement.

1 view0 comments

Recent Posts

See All

Comentarios


bottom of page