CLASS TEST
1. Write a Python program that asks
the user for their age, gender, and current fitness level (beginner,
intermediate, or advanced). Based on this information, suggest a suitable
fitness plan using if-else statements.
Requirements:
- Inputs:
- Age (integer)
- Gender (male/female)
- Fitness level (beginner/intermediate/advanced)
- Outputs:
- Recommend a fitness plan that includes:
- Suggested workout duration.
- Type of exercises (e.g., cardio, strength,
flexibility).
- Rest days.
- Logic:
- Use if-else to determine the plan based on
conditions such as:
- Age group (e.g., <18, 18–40, >40).
- Fitness level.
- Gender-specific advice (optional).
2.#WAP to calculate the amt payable after sales discount which is 10% up to the sales amount of 20000 and 17.5% #on amount above that. There is a sales tax payable (in range 5-12%)at the discounted price.
3. Write a program to accept a char and
display if it is in upper, lower case or it is a digit or a special character.
REVISION IF CONSTRUCT
1.WAP to print the Discount in Rupees for a salesman. The Discount is based on the following conditions
Sales Dis %
<Rs. 5000 5%
Rs. 5000 to Rs. 10000 8%
Above Rs. 10000 10%
[Dis=Sales*<Dis_percentage>)/100] ,[Total Amount=Sales-Dis]
2.Write a menu driven program to calculate:
1. Area of circle[A=πr2]
2. Area of squire [A=a*a]
3. Area of rectangle[A=l*b]
Comments
Post a Comment