Python- review
---------------------------------------------------------------------------
Hello Students!!
The Google meet link for today's class is:
-------------------------------------------------------------------------------------Today is our last class before summer break. As you all have already attempted a short assessment, let us discuss your responses.
But before I move ahead ...
In the blog-12, I gave you two questions to practice.
Please verify your answers of those questions from the following solutions:
►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►
Q1. Write a program to accept the number of units produced by a labour in a factory. Then calculate the amount to be paid to the labour on the following basis:
A) If a person has produced more than 500 units then she/he should be paid @ Rs. 10 per unit.
B) Otherwise she/he should be paid @ Rs. 8 per unit.
Ans.:
Let's see it's outputs in both the cases:
Let's analyse:
When Number of Units were 490, 495 or even 500, i.e. less than or equal to 500, the wages were given on the basis of Rs. 8 per unit.
But when the Number of Units were 505 or 510, i.e. more than 500, the wages were given on the basis of Rs. 10 per unit.
►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►
Q2. In a hostel, operated by a state government, the room rent is charged as follows:
A) Boys - Rs. 50 per day
B) Girls - Rs. 48 per day
You are required to develop a program in python that can help in calculating the total rent to be paid by a student for the number of days she/he has used the hostel room.
Ans:
Let's see it's outputs in both the cases:
Let's analyse:
When user entered 1 in place of Gender, then it took it as Male. Therefore, the per day rent applicable was Rs. 50/-.
When user entered 2 in place of Gender, then it took it as Female. Therefore, the per day rent applicable was Rs. 48/-.
A) Boys - Rs. 50 per day
B) Girls - Rs. 48 per day
You are required to develop a program in python that can help in calculating the total rent to be paid by a student for the number of days she/he has used the hostel room.
Ans:
Let's see it's outputs in both the cases:
When user entered 1 in place of Gender, then it took it as Male. Therefore, the per day rent applicable was Rs. 50/-.
When user entered 2 in place of Gender, then it took it as Female. Therefore, the per day rent applicable was Rs. 48/-.
►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►
I hope from the programs and the analysis of their outputs you must have understood them better...
►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►
That's all for today.
Thanks you
God Bless You
Computer Science Department
(Middle School)
Post_14_Class_10.txt
Displaying Post_14_Class_10.txt.
Comments
Post a Comment