0% found this document useful (0 votes)
81 views1 page

Procedures Functions Worksheet

Uploaded by

ekta sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views1 page

Procedures Functions Worksheet

Uploaded by

ekta sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Procedures and Functions Worksheet

Worksheet Questions

1. What is the difference between a procedure and a function?

2. Write a pseudocode for a procedure that prints a welcome message with a user's name.

3. Write a pseudocode for a function that calculates the square of a number.

4. Define a procedure to display the multiplication table of a given number.

5. Write a function to calculate the area of a rectangle given its length and width.

6. Why is modular programming using procedures and functions important?

7. Write a pseudocode for a function to check if a number is even or odd.

8. Design a procedure that uses a function to calculate and print the total price of items in a cart.

9. Write a function to calculate the factorial of a number using recursion.

10. Explain how procedures and functions improve code readability and reusability.

You might also like