if.and

/ Conditionals / if.and

 

Title : if.and
Purpose : For executing a certain code block when multiple conditions becomes true.
Syntax :
Input Parameters : cond: (Required) Condition to compare

equal: (Required) The value which needs to be equal to the condition

not_equal:  (Required – either equal or not_equal)

The value which should not be equal to the condition

Return Value : (void) It won’t return anything, instead it will execute the codes when the condition becomes true.
Example 1 :
Code :

Output : It will display the text “Hello, Start your engine” when both fuel

and key is present.

Description : In this example we are displaying a text when two conditions

becomes true.

Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *