Bus Seat Reservation
Please do exactly like this:
1. The program should ask the user to enter what row and seat number to reserve. Indicate
an ‘X’ mark if the seat is reserved.
2. Repeat Step 1; the program will stop until the user enters a negative number.
Please do exactly like this:
Screen/layout
Bus Seat Reservation:
Col 1 Col 2 Col 3 Col 4
row 1 | * * * *
row 2 | * * * *
row 3 | * * * *
row 4 | * * * *
row 5 | * * * *
row 6 | * * * *
row 7 | * * * *
up to row 10
Enter row and column no. to reserve separated by space (enter negative no. to exit): 4 4
Second Seat reservation sample output
Col 1 Col 2 Col 3 Col 4
row 1 | * * * *
row 2 | * * * *
row 3 | * * * *
row 4 | * * X X
up to row 10
numbers: the positive, the zero, and the negative ones. Today, we shall pay attention only to the negative ones now. Make a loop that will accept random decimal/float numbers. When the user inputs 0, the loop will terminate and then output the sum of all negative numbers inputted in 3 decimal places.
write the programme that implementes the following algorithms? start: read the total hours the employee has woked,Total hours. Read the hourly rate of pay for the employee,Hourly rate. gross salary=total hours*hourly rate. tax=gross salary *0.1 Net salary =gross salary-tax. Display net salary
Write a python program to generate a quiz using two files, named Questions.txt and Answers.txt. The program opens Questions.txt and displays the question with options on the screen. The program will verify the Answer.txt file and display the scores.
For example, Questions.txt file contains the following details:
1. Who is the prime minister of India?
A. Narendra Modi B. Shivraj Patil
2. Who is the President of USA?
A. Donald Trump B. Joe Biden
Answer.txt file contains the following details:
1.A
2.B
If inputs are A and B, then the Score is 100
case=1
input= A
B
output=100
case=2
input: A
A
output=50
case=3
input=B
A
output=0
Q1. Define a class Deposit that has a principal, a rate of interest, which is fixed for all
deposits and a period in terms of years. Write member functions to
(i) alter(float) which can change the rate of interest.
(ii) interest() which computes the interest and returns it.
(iii) print() which prints data as shown below. Note that the width of each column is 20.