0% found this document useful (0 votes)
17 views

Assignment 1

The assignment for Programming Fundamentals at the National University of Computer & Emerging Sciences requires students to solve ten programming problems using pseudocode and flowcharts. Each question must be documented in separate folders, with strict guidelines against plagiarism and penalties for late submissions. The problems cover topics such as salary calculation, age determination, grade assignment, and number conversion.

Uploaded by

zurainali860
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Assignment 1

The assignment for Programming Fundamentals at the National University of Computer & Emerging Sciences requires students to solve ten programming problems using pseudocode and flowcharts. Each question must be documented in separate folders, with strict guidelines against plagiarism and penalties for late submissions. The problems cover topics such as salary calculation, age determination, grade assignment, and number conversion.

Uploaded by

zurainali860
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

National University of Computer & Emerging Sciences - Islamabad

Programming Fundamentals
Fall 2022

Assignment - 1
DUE DATE: 12th September, 2022, 11:59PM

Topic: Problem Solving


Max marks: 100

Guidelines for assignment:

1- Make separate document for each question. Do the same for each question while
creating a flowchart in the Scratch tool.

2- Name the folder as question number (e.g., Q1). Add question (pseudocode) and flow
chart inside that named folder. In the end, place all folders in a single final folder. Name
the final folder as Sec_YourRoll_Assign1. Your final folder should have ten (10) subfolders
in it. (i.e., Q1, Q2, Q3…., Q10)

3- There is no room for plagiarism. In case your assignment finds to be copied from
somewhere, this will lead to severe consequences, even to an ‘F’ grade in the course. Try
to learn by doing assignments yourself.

4- Late submissions will be awarded scores according to the following


a. Submission within next 24 hours will result in 50% deduction
b. Submission after 24hrs but within 48 hours will result in 75% deduction
c. Submissions received after 48 hours will be awarded zero.

Questions:

1. Write a pseudo code for the program that takes an input of the sales made by the
salesman for the month and calculates his salary, which is 15% of the total sale.

2. Write pseudo code for the program that calculates the reciprocal of a non-zero integer
entered by the User, stores it, and prints it. Note that Reciprocal is the inverse of a value
or a number. If n is a real number, then its reciprocal will be 1/n. The reciprocal of the
non-zero rational number q/p is p/q.

3. Write a pseudo code of the program that takes input from the user the current date &
user’s date of birth and calculates his age.

4. Write pseudo code of a program that takes two numbers as input from the user, saves
them, and swaps their values without using any third variable. (Hint: Use basic addition
and subtraction operations)
5. Write pseudo code of a program that asks the user his final percentage and assign
him/her a grade according to the following plan.

A -------- Above or on 80%


B -------- Between 70% - 80%
C -------- Between 70% - 60%
D -------- Between 60% - 50%
F -------- Below 50%

6. Write a pseudo code of a program that implements the second equation of motion to
compute the distance S. All other parameters are inputs form the user.

S = vit + ½ at2

7. A candidate is to be selected for the admission test based on the following criteria:-

i. The candidate must be under 20 years and did not appear in this test
before.
ii. The candidate must have done FSc Pre-Eng. and scored at least 60%
marks OR he has done an equivalent diploma with at least 70% marks
OR he has done A-level with a minimum of 2 A’s.

If all the above conditions are satisfied, check whether the candidate has registered for
the test and paid the admission test fee; if yes, issue the admission test appearance slip.
You have to write a pseudo code for this process.

8. Write a pseudo code for a program that takes a number in decimal number system as an
input (e.g., 95) and displays its equivalent in binary (e.g., 95 → 01011111 ).

9. Write a pseudo code of a program that inputs a number from the user and checks
whether the number is prime or not.

10. Write a pseudo code of a program that takes an alphabet as input from the user and
checks whether it is a vowel or not, terminate the program if the user enters a vowel.
Use a repetition strategy to implement your logic.

Please note that for each pseudo code, you also need to create a flowchart using scratch tool
and submit both the pseudocode and flowchart as per instructions.

You might also like