Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

i need all the answer 1. (5 points) Find the errors in the following: a = int(pr

ID: 3799367 • Letter: I

Question

i need all the answer

1. (5 points) Find the errors in the following:

a = int(prompt("Enter a number: "))

b = int(input("Enter a number: ))

average = a + b / 2

if (average % 2 = 0 )

print("Average is even")

2. (5 points) Write Python expressions for each of the following:

a. Determine if n, an integer, is between 35 and 50 inclusively.

b. Determine if n, an integer, is greater than 80, but less than or

equal to 100.

c. Determine if n, an integer, is odd.

d. Determine if n, an integer, is divisible by 7.

e. Determine if n, an integer, is divisible by 4 or 3, but not both.

3. (5 points) If p is true, q is false ,r is false, x is 5, y is -3, and z is 0.

What is the value of each of the following expressions:

a. not r and (p or q) and z > x

b. not q and p or x != y and r

c. not (r and p) or (z < y)

d. not (x < z and y != 0) and r

e. not p and not(not q and r) or not(x < y)

4. (5 points)Write an algorithm(or pseudocode or flowchart) for :

Ask the user to enter their year of their birth. Validate the year, to verify it is between 1920 and 2017 -- and display error message if it’s not valid. Print the user’s current age based on the year of their birth. Repeat this until the user wants to quit.

5. (5 points)Convert the above pseudocode into a python program.

       Screenshot must be included.

Explanation / Answer

(1)--->In line 1,prompt() method requires two parameters but it is taking only one parameter...
In line 2,we should have a double qoutes on both left side and rightside...but there is no ending for double quotation in given code
In line 4,comparison equal operator should be == but in the code it is appearing just like = only