Expt2 - Basic Client Server Programs
Expt2 - Basic Client Server Programs
Expt2 - Basic Client Server Programs
Objectives: To design and develop client server architecture using socket programming in python
Problem Statements: Design and Implementation of Client-Server Based Application Using Socket
Programming
LEVEL: EASY
6. Take values of length and breadth of a rectangle from user and check if it is square or not.
7. Take two int values from user and print greatest among them.
8. A shop will give discount of 10% if the cost of purchased quantity is more than 1000.
Ask user for quantity
suppose, one unit will cost 100.
Judge and print total cost for user.
9. A company decided to give bonus of 5% to employee if his/her year of service is more than 5 years.
Ask user for their salary and year of service and print the net bonus amount.
10. Take input of age of 3 people by user and determine oldest and youngest among them.
11. A student will not be allowed to sit in exam if his/her attendance is less than 75%.
Take following input from user
Number of classes held
Number of classes attended.
And print
percentage of class attended
Is student is allowed to sit in exam or not.
12. Modify the above question to allow student to sit if he/she has medical cause. Ask user if he/she has
medical cause or not ( 'Y' or 'N' ) and print accordingly.
LEVEL: MEDIUM
1. Program to Calculate the Sum of Natural Numbers: The positive numbers 1, 2, 3... are known
as natural numbers. The programs below takes a positive integer (let say n) as an input from the
user and calculates the sum up to n
2. Program to Find Factorial of a Number: The factorial of a positive integer n is equal to
1*2*3*...n.
3. Program to find the sum of digits of a number until a single digit is occurred.
Input: 987654
Output: 3
4. Age Calculator: This program will read your date of birth and print the current age. The logic
is behind to implement this program - Program will compare given date with the current date
and print how old are you?
Enter your date of birth (DD/MM/YYYY): 18/10/1987
Current Date: 12/3/2016
5. This program will read principal, rate and time in years and then print compound interest
on entered principal for given time period.
Compound interest is the amount in which interest is added into the principle so that interest
also can be earned interest with the principle.