Question: 17) Write the code with the right Python syntax. In this program, Luhn Algorithm is used to check if a credit card number is valid

17) Write the code with the right Python syntax.17) Write the code with the right Python syntax.17) Write the code with the right Python syntax.17) Write the code with the right Python syntax.
17) Write the code with the right Python syntax. In this program, Luhn Algorithm is used to check if a credit card number is valid or not. The steps are shown in the following diagram: -H I----- I+9+5+l+1+6+9+7+?+2+3= If the total ends in zero, then it's a valid card number. If not, it is an invalid card number. Communication [20 marks}: 18. What are the advantages and disadvantages of technology: (10 marks) a) In terms of environment b) In terms of human health 19. How is Computer Science connected to other subjects like Biology, Physics, Chemistry, etc? Detail your answers with examples. Application (15 marks): 20. Design a Python function named "createSum()" that: (7 marks) -Reads in a string of numbers. - Converts the string to a list of integer numbers. -If the first number is odd, compute the sum of all the numbers. - Otherwise, if the first number is even, compute the product of all the numbers. -Returns the value that you computed above. Include docstring. Ex: if the string is '5 3 6' it would return 14. If the string is '4 2 5' it would return 40.21) You have been asked to write an application for Bakery in Python. Your application should be able to hold the current quantity of muffins in the bakery's display window. The bakery makes 7 types of muffins every day. The day always starts off with 5 of each muffin type. Write a program which allows you to remove a muffin as it is purchased. Display the purchase sequence when the user wants to see it. Sample output: Quantity Left: Bran: 4 Chocolate: 3 Blueberry: 1 Carrot: 2 Lemon: 4 Banana: 1 Leftover-Supreme: 5 Purchase Sequence for Today: Banana, Lemon, Bran, Banana, Banana, Chocolate, Banana, Blueberry, Carrot, Blueberry, Chocolate, Carrot, Blueberry, Blueberry, Carrot

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!