Discussion Response 200

Discussion Response 200

Respond to each post in 150 words.

1 of 2

Hello Class,

Boolean was developed by an English mathematician and computer scientist by the name of George Boole (. His concept was algebraic and logical in that all variables are value with a 1 or a 0 and in turn representing a true or false concept, problem, or command. Boolean comes with many different terms such as data types, values, and operators.

There are three Boolean operators: AND, OR, and NOT. These are used to broaded or narrow your search among electronic data bases. For example, when using a search engine and you search for “football AND baseball”, your returned items will be all listed items that contain information about both football and baseball together within them. If you search for football or baseball, you returned list will contain all items with either football or baseball inside regardless if they have both or not. If you search for “football not baseball”, your search will return all items with football that don’t list baseball within them.

If-then statements tell your program to apply a certain execution only if the set of code is not false but true. For example a=1, b=0, c=1. If you were to say a – c = b. Then that statement would be true. If you were to say a – b = b. Then that statement would be false and the program would not execute. The “if-then-else” statements provide an alternative path if the original statement appears to be false. It gives the program an option beyond just the original statement. I hope I didn’t confuse anyone as much as I confused myself writing this.


2 of 2

1. Explain the concept “Boolean.”

2. Discuss how and when you use these two structures (if-then-else structures and if-then).
3. Provide a screenshot of an example you used in Python to illustrate this process.

A Boolean is a value that is either true or false. There are Boolean operators and data types, some Boolean operators are And, Or, Not, and Nor. For example if I were to say that “a library is a place to rent books for free”. with the Boolean operator And, the statement is true if the value of “rent” and “free” are met but false if they aren’t. The Boolean data types are any data type that has either true or false, yes or no, or on or off. By default, the Boolean type is set to false.

If-then statements allow you to tell a program to execute a section of code only if a particular test is true. If it is false it goes to the end of the statement. with an if-the-else, you have a secondary path for when the if clause is false.