CGSC 1005 Lecture 3: COMP SCI Sept. 12
Document Summary
We use the input function to get info from the use we need to assign the user input in to a variable. *the input function will always return what was typed as a string. We can convert info from one type of data to another by calling the appropriate function. Sometimes our program needs to check if something is true or false. To do that we use the bool type (bool = boolean) Bool only has two possible values: true and false note, upper case. Wanting to check if the following is true: weather is sunny and the weather is warm. And takes 2 boolean arguments and returns if both are true. Or takes 2 boolean arguments and returns if one (or both) is/are true. Not takes 1 boolean argument and returns the opposite of it x = true y = false print (x or y) X = true so it prints the entire statement as true.