Assignment
Submitted by:
Haseeb Khan
Submitted to:-
Prof.Shahzeb Iqbal
Degree:
BS Computer Science (CS)
Class:
1st Semester (Self-Support)
Department:
BSCS(Computer Science)
Subject
Programming Fundamentals
Lab Tasks
Question 1: Arithmetic Operations
Write a program that takes two numbers as input and performs addition,
subtraction, multiplication, and division.
Question 2: Temperature Converter
Create a program that converts temperatures from Celsius to Fahrenheit and
vice versa.
Question 3: Currency Converter
Implement a program that converts currency from one unit to another (e.g.,
USD to EUR).
Question 4: Time Converter
Write a program that converts seconds into hours, minutes, and seconds.
Question 5: Incremental Savings
Develop a program that calculates the total savings after a specific percentage
increase over several months.
Question 6: Speed Calculator
Create a program that calculates the average speed of a vehicle given the
distance traveled and time taken.
Question 7: Square and Cube Calculator
Implement a program that calculates the square and cube of a given number.
Question 8: Area of a Circle
Write a program that computes the area of a circle using the radius.
Question 9: Electricity Bill Calculator
Develop a program that calculates the electricity bill based on the number of
units consumed.
Question 10: Odd or Even
Create a program that determines if a given number is odd or even.
Question 11: Leap Year Checker
Write a program to check if a given year is a leap year or not.
Question 12: Factorial Calculator
Implement a program that calculates the factorial of a given number.
Question 13: Fibonacci Series
Write a program to generate the Fibonacci series up to a specified term.
Question 14: Bitwise Operations
Create a program that demonstrates bitwise AND, OR, and XOR operations
on two integers.
Question 15: Logical Operators
Write a program that uses logical operators to check if a number is in a
specific range.
Question 16: Relational Operators with Grades
Develop a program that assigns grades (A, B, C, D, or F) based on user input
marks.
Question 17: Simple Calculator
Implement a basic calculator program that supports addition, subtraction,
multiplication, and division.
Question 18: String Concatenation
Write a program that concatenates two strings using the + operator.
Question 19: Boolean Logic
Create a program that simulates boolean logic operations (AND, OR, NOT) on
binary numbers.
Question 20: Time Comparison
Develop a program that compares the time taken by different algorithms or
processes and displays the most efficient one.