Pseudocode Practice Questions
Pseudocode Practice Questions
Q1. Write a pseudocode that checks if a student has passed an exam. The student
passes if their score is 50 or more AND they have attended more than 75% of the classes
OR they have a medical exemption. Display "Pass" if the conditions are met; otherwise,
display "Fail."(Range Check)
Q2. Write a pseudocode to check if a person is eligible for a loan. The person is eligible if
their credit score is above 700 AND they have an income over $30,000 OR they have a
guarantor. Display "Eligible" if they qualify; otherwise, display "Not Eligible.
Q3. Create a pseudocode that takes a student’s score as input and outputs their grade
according to the following criteria:
Q4. Write a program that takes the speed of a vehicle as input and classifies it according
to the following conditions:
Q5. Write a pseudocode to check if the user input is a valid integer. If the input is not an
integer, display an error message.( Type check)
Q6. Write a pseudocode to check if the user has entered any input. If the input is blank,
display an error message. (Presence Check)
Example:
INPUT user_input
IF user_input =” “ THEN
PRINT "Error: No input provided."
ELSE
PRINT "Input received."
END IF
Now make 2 Pseudocode
1)for checking password has input or not
2) for checking phone number has input or not
Q7. Write a pseudocode to Check if the user input is in a valid email format (basic
format: contains "@" and ".").( Type check)
Example:-
INPUT date
IF date matches pattern "YYYY-MM-DD" THEN
PRINT "Date is in valid format."
ELSE
PRINT "Date is in invalid format."
END IF
Q8. Write a pseudocode to Check If hex Color Code starts with "#" and has 2-7
characters and valid hex digits (0-9, A-F). (Type check)
Hex Color Code Format Check (e.g., #FFFFFF)
INPUT hexColorCode
If hexColorCode starts with "#" AND hexColorCode has characters 2-7 are valid AND hex
digits (0-9, A-F)
Print "Hex color code is in valid format"
Else:
Print "Hex color code is in invalid format"
Q9. Write a pseudocode to Check Time Format Check (24-hour format, HH)