N = 0
<span>1 read x </span>
<span>n = n + 1 </span>
<span>print x </span>
<span>If n > 1, go down to 2 </span>
<span>small = x </span>
<span>large = x </span>
<span>2 If x</= small, then small = x </span>
<span>If x>/= large, then large = x </span>
<span>If n < 12 , go back up to 1 </span>
<span>Print small </span>
<span>Print large </span>
<span>end</span>
def GPAcalc(grade, weighted):
grade = grade.lower()
dictionary = {"a": 4, "b": 3, "c": 2, "d": 1, "f": 0}
if weighted == 1 and grade in dictionary:
return "Your GPA score is: "+str(dictionary[grade] + 1)
elif weighted == 0 and grade in dictionary:
return "Your GPA score is : "+str(dictionary[grade])
else:
return "Invalid"
print(GPAcalc(input("Input a letter grade: "), int(input("Is it weigthed? (1= yes, 0= no)"))))
I modified the code a bit to cut down on the use of if and elif statements. If you need me to change it, I will. Best of luck.
Answer:
C. ASCII code
Explanation:
Reflected code is another term for gray code so you can cross both out.
BCD code is binary decimal code used in scientific and graphic calculators
ASCII code is the only one use in a computer keyboard so I'm guessing that's the answer. :)
Answer:
SELECT inventory_id, film_id, title, store_id, address_id
FROM Inventory.Inventory
JOIN Business.store ON Inventory.store_id = store.store_id
JOIN Business.rental ON rental.film_id = Inventory.film_id
JOIN film_text ON Inventory.film_id = film_text.film_id
WHERE COUNT(rental_id) = 0;
Explanation:
The JOIN clause is also used to query tables from two databases. The Inventory and the Business database are joined in the inventory and store table respectively. The Query also joins the inventory table and the film_text table to get the title or name of the film rented where the rental_id count is equal to zero.