Nothing Special   »   [go: up one dir, main page]

Assignment1 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Assignment No 1

Make a family tree using the following data


Facts:
Ali is male.
Asad is male.
Sara is female.
Zara is female.
Asad is parent of Zara and Ali.
Sara is parent of Zara and Ali.
Rule:
X is a sister of Y if X is a female and X and Y have same parents.
Provide the name of any sibling to retrieve names of parents.
Provide the name of a parent and retrieve names of siblings.
Assignment No 2
Take a number as input from the user and determine whether number is even or odd.
Take a number as input from the user and calculate its factorial.

You might also like