You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Course material can be found at: https://llacorp.github.io/Python-Course-for-Scientific-Programming/ "
32
+
]
33
+
},
34
+
{
35
+
"cell_type": "markdown",
36
+
"metadata": {
37
+
"id": "eYqb_LTserLh"
38
+
},
39
+
"source": [
40
+
"# LESSON 3 EXERCISES"
41
+
]
42
+
},
43
+
{
44
+
"cell_type": "markdown",
45
+
"metadata": {
46
+
"id": "-rYMKOqDez5v"
47
+
},
48
+
"source": [
49
+
"## <ins>Exercise 1</ins>:"
50
+
]
51
+
},
52
+
{
53
+
"cell_type": "markdown",
54
+
"metadata": {
55
+
"id": "0-NaBG9XhgU8"
56
+
},
57
+
"source": [
58
+
"Write a Python function to check whether a number is perfect or not. It should return `True` or `False`.\r\n",
59
+
"\r\n",
60
+
"***Wikipedia source***: In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself (also known as its aliquot sum). Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself). \r\n",
61
+
"<ins>For example</ins>: The first perfect number is 6, because 1, 2, and 3 are its proper positive divisors, and 1 + 2 + 3 = 6. Equivalently, the number 6 is equal to half the sum of all its positive divisors: ( 1 + 2 + 3 + 6 ) / 2 = 6. The next perfect number is 28 = 1 + 2 + 4 + 7 + 14. This is followed by the perfect numbers 496 and 8128."
"Write two Python functions to find the $F_n$ Fibonacci number using an iterative method and recursion. The only argument is `n`.\r\n",
119
+
"\r\n",
120
+
"***Wikipedia source***: In mathematics, the Fibonacci numbers, commonly denoted $F_n$, form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is,\r\n",
0 commit comments