10-16-2024, 04:01 PM
This accomplishes the first code directly:
Why mess with something simple and straight forward?
The thing about IMP as bit operator (not particularly Logical in human sense) which does need numbers to operate on is that when the premise A is false IMP will return True, does not matter what 2nd premise B is true or false.
This completes the Truth Table for doing bit operations and the sole reason why IMP exists, so you can have a special set of results for each combination TF premise A and TF premise B. If A is false it returns True regardless what B is.
Code: (Select All)
Input "Which color do you prefer? Pink or Blue: ", C$
If C$ = "Pink" Then
Print "You're a Girl!"
ElseIf C$ = "Blue" Then
Print "You're a Boy!" ' Dimster had typo You"re
Else
Print " Invalid color choice"
End If
Why mess with something simple and straight forward?
The thing about IMP as bit operator (not particularly Logical in human sense) which does need numbers to operate on is that when the premise A is false IMP will return True, does not matter what 2nd premise B is true or false.
This completes the Truth Table for doing bit operations and the sole reason why IMP exists, so you can have a special set of results for each combination TF premise A and TF premise B. If A is false it returns True regardless what B is.
b = b + ...