Programming First Batch (Suquence) 1-14
Programming First Batch (Suquence) 1-14
First Batch
Suequence
Note: These tasks are to be solved in a programming language and in Pseudocode. Where instructed
give the output as given using concatenation operator of selected langauage and & for pseudocode.
Task # 1 : Input the length and width of a rectangle and print the area and perimeter.
Task # 2 : Input the time in hours and minutes. Convert this time in to minutes and print the time in
minutes.
Task # 4 : Input the marks obtained by a students in three tests. Input the Maximum obtainable marks
also. You may assume that all test have the same Maximum obtainable Marks. Print the Total Marks,
Total Percentage and Average Marks of the Student. Your output must all be in one print statement
using concatenation of variables and string constants.
Task # 5 : Input the unit price and quantity of an item sold. Calculate the total and Tax. Tax is 17.5% of
the total. Print the total, Tax and Total Payable.
Task # 6: Input the temperature in Centigrade, convert and print in Fahrenheit e.g
If the user enters 100 centigrade your program should print 212 Fahrenheit.
F =32 + 9*C/5
Task # 7: Input the name, age and Salary of a person. Give the following output.
Mr. XXXX after five years you will be XX years old. Your salary is XXXXXX. I hope this is monthly.
Salary is a float variable so you must use the float function rather than int.
Task#8: Input three real numbers. Your program should work like the shown below
Task # 10: Input the numbers of oranges purchased by a customer. Print the number of boxes needed
for packing if a box can hold 8 oranges. Also print print how many oranges will be left unpacked because
we must have 8 oranges in one pack.
Task # 11: Input the number of pages a students wants to print. The shop sells pages in either packets or
loose sheets. The cost of one packet is
So if a students wants to print 230 pages he will need to pay for two packets and 30 loose
sheets. Print the total bill for the student, you must print both costs individually and then total
cost. With this sample data your output shoud look like
Task #12: Input the time in seconds and print in hours , minutes and second.
Test your program with 4000 seconds . Your output should be in the given format.
Task #13: Input a 4-digit number and print the sum of its digits. You may assume that user will only enter
4 digit number and invalid data will not be entered.
Task # 14: Input a 4-digit number and covert it into its reverse and print it. for example user enters 1234
convert it to 4321. Dont just print them in reverse order, they must be saved as one number.