Python-IF(Prac)

Hello dear students!!

I would like to request you to mark your attendance by filling the form with the link below. Remember, if the registration number is entered incorrectly, attendance will not be allotted.


-------------------------------------------------------------------------------

By the end of this session, you will be able to:
  • Understand the purpose and structure of the IF command
  • Apply the concept learnt and solve the problem given
  • Create a program to solve the task at hand.
--------------------------------------------------------------------------------    The Google meet ID for today is:
----------------------------------------------------------------------------           
This is blog is going to give you an insight into the  practical tasks to be taken for Python Programing.

Let us begin our discussion today with the answers of the programs given to you in blog-10.

►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►

Q1. Write a program to accept the age of a person and then tell whether she/he can vote in Elections in India or Not.

Ans. 

Let's see it's output: 
Case 1: When 19 is entered as AGE

 Case 2: When 17 is entered as AGE


Q2. Write a program to accept the value of Basic Salary of an employee and then show the following:
#   HRA = 24% of Basic Salary
#   DA = 9% of Basic Salary
#   PF = 12% of Basic Salary
#   Gross Salary = Basic + HRA + DA - PF
#   Income Tax = 10% of Gross Salary
#   Net Salary = Gross Salary - Income Tax
#   If  the INCOME TAX is lower than 1500 then she/he should get the following message
  • "Congratulations"
Otherwise the she/he should get the following message: 
  • "You should increase your savings"

Ans. 

Let's see the output: 
Case 1: When 10000 is entered as Basic Salary:-

Case 2: When 20000 is entered as Basic Salary:-

►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►

This is our 2nd session based on IF Condition, Following is a program to written by you.  This is classwork, and you are to submit it during this period only.  Once submitted, your work will immediately reach me and I'll discuss the same with you in Google Meet. 

The program that you type  will reach me in an Excel Sheet. I would try to discuss certain answers right now


Fill the following forms: 




►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►


That's all for today...

Kindly note the following questions as your homework exercise:


Q1. Write a program in python to accept the fees of a student and her/his percentage in the exams. If the percentage is higher than 75 then reduce the fees by Rs. 500 and print the new fees on the screen, otherwise reduce the fees by Rs. 200 and print the new fees. 


Q2. Write a program to accept the RATE and QUANTITY of a product. 
Then show the following:- 
(A) Amount (i.e. Rate X Quantity)
(B) Net amount after deducting the discount on the following basis:

  • If the Amount is more than 5000 then give discount at the rate of 20% of Amount
  • Otherwise give discount at the rate of 10% of Amount. 
►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►►


Thank you

God Bless You

Computer Science Department
(Middle School)

Comments

  1. We have a google meet class. Link has been shared. pls join

    ReplyDelete
  2. Ma'am I am Sanatan Ashish Hembrom 10-C I'm giving attendance from comment box because typed wrong registeration no.

    ReplyDelete
  3. Adam Saviour Kerketta present ma'am

    ReplyDelete

Post a Comment

Popular posts from this blog

Python-IF command

Python- relational operators