Question 2: Problem Solving, Relational Expressions [4.0 marks] a. Suppose x and y are variables, each of which contains a number that you take as input from user. Wite a code fragment to set y to x if x is positive and y to 0 if x is negative. 1: 1 \#Your Code Here b. Suppose x and y are variables, each of which contains a number. Write a code fragment that sots y to the absolute value of x without caling the abs() function. Use an if statement. Question 3: Problem Solving, Arithmetics and Relational Expressions [ 5.0 marks] Write a program to read two positive numbers from the user. Those numbers represent the width and length of a two-dimensional shape. The program should display whether the shape is a rectangle or a square based on the equality of the length and width values. Make sure to validate the user ingut, if the user does not enter positive numbers, display a logical error messago. Valid input is the numbers betweon 1 and 20 for both length and wiath Anything other than these numbers is considered as invalid input. You must compare the iength and width to determine the ahape only it the user entor correct values. This will require a nested it structure. Rubric - reading input from user: 1.0 marks - validato user input 2.0 marks - correct comparison: 1.0 marks - used a nested-t structure: 1.0 marks Write a program to receive the following inputs from a customer: - Amount of grocery online shopping - Store name - Type of delivery (delivery or pick up) Use the above input values and compute the final total price and print the result to inform customer. (Do not forget to add service charges as well to each purchase, service charges are applied after adding the delivery or shippinng cost.). Your program format is a "Nested branches" by using "if and/or "else" andlor "elif and any other necessary Python commands. Test the program for 2 diflerent sets of inputs and show the results. In order to test the code for. multiple inputs and to show the result, you can copy the same code and multiple cells and run each time with a different set of input values. Rubric - input (grocery amount, store name, delivery type) 1.5 marks - correct use of descision statements, 20 marks - correct computation of total amount: 2.0 marks - displaying output: 1.0 marks - proper use of variable names, proper comments, simple logic: 1.5 marks - Testing for atteast 2 inputs: 2,0 marls Service charges are given percentage of amount of grocery. Question 5: Demonstrate Your Understanding [5+5 marks] In the class we discussed the examples of earthquake and students' grade using if-elif-else structure. In both of these examples, the ardor of tests matter. If you change the order of tests (conditions), you will gat an incorrect ouput. Your task in this question is to give an exarnple of an iffolifielse cequonce where the order of the tests does not matter and give an example where the order of the tests matters. Specily your problem statement and then write down your program. Test your programs for atleast 1 test cases in each group. Rubric - correct example of "order of tests does not matter" and correct use of i-eli-else: 4.0 marks - correct example of "order of tests matters" and correct use of if eelf-else: 4.0 marks - Testing 1.0 marks - Probelm well explained: 1.0 marks