Question
1. Evaluate Boolean Expressions What is the value of the following Boolean expressions? Assume the following values for a=2, b=4, c=6. a. a==4 or b>2
1. Evaluate Boolean Expressions What is the value of the following Boolean expressions? Assume the following values for a=2, b=4, c=6. a. a==4 or b>2 b. 6<=c and a>3 c. 1 !=b and c!=3 d. a>=-1 or a<=b e. not (a>2) Submit your answers in the online text box. For each of the following programs, start your code with three comment lines explaining what your program does, your name as the author, and the date you finished the program. You must submit your own work and only use concepts being taught in class.
2. Word Check a. Write a Python program (WordCheck.py) that checks if a non-capital word entered by the user is in the first half of the alphabet, i.e. between the letters a-n, n excluded. The program will prompt the user to enter a word, and print True, if the word is in the first half of the alphabet, and print False otherwise. (An example of such a program is shown on slide 13 of lecture 6.) b. Run your program 4 times. Which result do you expect? Did the program show the expected result? i. Enter a word that starts with "h". ii. Enter a word that starts with "m". iii. Enter a word that starts with "n". iv. Enter a word that starts with a capital letter. Save the Python Shell window as Test2.txt. Submit your source code file WordCheck.py and Test2.txt.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started