Question Description
1. For these problems, a Boolean expression: means an expression like “2 < x <= 4” or “5<x and y>2”
a. If r and s are both numbers: write the Boolean expression that will make the statement that (r – s) is greater than -4 and less than 5.
b. if r = 8 and s = 2, what value would Python assign to the expression you wrote in part a. ?
c. if x=5,y=2, and z=False, what value will Python return if you type in this sentence: z == True and x < 4 or y >1
d. Write one Boolean expression that says the numbers n and r are both between 1 and 6 inclusive.
e. Write one Boolean expression that says the numbers n and r are either or both less than or equal to 4
2. Simplify using De Morgan’s laws: Note: the idea is to get rid of the not in each expression by using De Morgan’s law and then use a Boolean expression to express the a and b equalities and inequalities.
a. not (a >= 3 and b <= -2)
b. not(b<4 or a>2)
3. For the following problem submit a photo of the flowchart and shots of your Python screens showing the program code and the output. Your task is to input from the teacher the test score of each student and to output the highest score. You need to check each score to make sure it is valid (at least 0 and at most 100). If it is not valid, keep prompting for a valid score until you get one. After a valid score is input, process it, and then ask the teacher if she has another score to enter.
When you run the program, test the logic when the score entered is invalid, when it is a valid score, and when the teacher says she has no more scores to enter.
4. For the following problem submit a photo of the flowchart and shots of your Python screens showing the program code and the output. There are 6 students in the group. Ask each student to enter the number of minutes it took them to complete the homework. Only accept a non-negative number. If the number entered is negative, keep prompting until a non-negative number is entered. Find the average number of minutes to complete homework. Print a message that includes the average number of minutes.
Check the logic of your code by seeing what happens when you enter an invalid number of minutes and when you enter a valid number of minutes.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.