Question: please use simple if statements ( begginers coding ) no profesional coding Exercise#3: The Dubai metro ticket price depends on the number of stations in
please use simple if statements ( begginers coding ) no profesional codingExercise#3: The Dubai metro ticket price depends on the number of stations in a metro ride. The prices are as follows: From 1-5 stations ticket price is 15 AED From 6-10 stations ticket price is 20 AED From 11-15 stations ticket price is 25 AED More than 15 stations ticket price is 30 AED Write a program that will ask the user to input the number of first and last station in his ride and will output the ticket price for this user. Example 1: Enter the number of first and last station: 13 15 Your ticket price is : 25 AED Example 2: Enter the the number of stations: 3 16 Your ticket price is : 30 AED 2/4 Exercise#6: Write a program to ask the user for a transaction type, old balance, and the money amount for the transaction. Then it tells the user the new balance after the transaction. Use a switch statement to implement your solution. Possible transaction types are: 'D' or 'd' for deposite, 'W' or 'w' for withdraw, 'T' or 't' for transfer. Example! : Enter your transaction type: D Enter your old balance: 100 Enter the money for transaction : 20 Output: Your new balance is 120 Example2 1 3/4 Enter your transaction type: W Enter your old balance: 100 Enter the money for transaction : 20 Output: Your new balance is 80 Example3 Enter your transaction type: Enter your old balance: 100 Enter the money for transaction : 50 Output: Your new balance is 50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
