Work Sheet
Work Sheet
🚫 Please read the instructions carefully. Any form of deviation from these rules
will not be tolerated.👇👇
• Rules:-
• Deadline:-
June 12, 2025 — 12:00 PM (Thursday before class). (Click to Use the Google Form)
Computer Programming Worksheet
Develop an algorithm for each of the following problems. Use flowchart and pseudocode
method of developing an algorithm. An algorithm that:
2. Converts a mark for a course to its corresponding letter-grade. (You may set your own
scale for the grading)
3. Checks if a number is EVEN or ODD.
4. Counts and displays the number of even and odd numbers in the list [1,2,3,…,15].
5. Finds the minimum and maximum of two given numbers.
6. Finds the minimum and maximum numbers from a given list of numbers.
7. Write a program that prints the number of days in a month when the user enters the name
of the month. Use lists to group months that have the same number of days.
8. Displays the next day’s date, given today’s date.
9. That accepts two numbers and displays the product, sum, and difference of the two
numbers.
10.That reads a number and prints the sum of the integers up to the number, i.e.
1+2+3+4+…+n
11.That reads a number n and prints 2n.
2. Write a program to find the last prime number occuring before the entered number.
Example: input a number to find the prime number occurs before the number 50.
47 is the last prime number before 50.
3. Write a program that calculates and displays the area and the circumference of a circle
based on its radius entered from the keyboard.
4. Write a program that swaps the values of two variables and displays their former and
current values. The values of the variables are to be entered from the keyboard.
5. Write a program that tells whether a number entered from the keyboard is an even or an
odd number.
6. Write a program that tells whether a number entered from the keyboard is a positive
number or a negative number or zero.
7. Write a program that tells whether a character entered from the keyboard is in uppercase
or in lowercase or neither.
8. Write a program that accepts a character entered from the keyboard and tells whether it is
a digit or a letter or a special symbol.
9. Write a program that converts a temperature given in Fahrenheit into Celsius and vice
versa. The program should distinguish temperature entered from the keyboard as in
degree centigrade or as in degree Fahrenheit by the letters ‘c/C’ or ‘f/F’ that must be
written in front of the numeric values of temperatures.
For example: If the user enters 10 c or 10 C, the program must understand that the input
is in degree centigrade so it should change to degree Fahrenheit and must display the
temperature as 50 f or 50 F.
10.Write a program in Python to list non-prime numbers from 1 to an upper bound.
Example output: Input the upper limit: 25
11. Write a program in Python to display the first n terms of the Fibonacci series.
12.Write a program in Python to display the number in reverse order.
Sample output: Input a number: 12345
**
***
****
*****
14.Write a program in Python to display the pattern like a right-angle triangle with numbers.
Output:
12
123
1234
12345
Repeatedly ask the user for numbers until they type stop. Print the total sum of the
numbers entered.
17. Print a hollow square of stars using nested for loops. The user provides the size n (n
≥ 3), which represents both the height and width of the square.
Example for n = 5:
if: