Programming Exam
The pen-and-paper coding exam is given in the class.
Once you finished the exam, please take a picture and submit the picture file.
Exam
Q1. Please write a function named "factorial" that takes one non-negative integer parameter as input and returns its factorial value. ( n!= n*(n-1)(n-2)...21)
Q2. Please write a function named "star". Please write a python code that that takes an integer input from user; Based on that number, python will print out the reverse Pyramid looks like graph1 with height equals to the number (assume the user inputs 12 for the example graph).
++++++++++++
///////////
**********
---------
++++++++
///////
******
-----
++++
///
**
-