/python-practice

Python Practice Codes

Primary LanguagePython

python-practice

Python Practice Codes

Practice set: 1

1.1. Find if n is prime number.
1.2. Convert the above solution to a function.
1.3. Find sum of prime numbers between 1000 and 2000.
1.4. Read n numbers. Find the following parameters:
        a. Average
        b. Maximum
        c. Minimum
        d. Second maximum
        e. Second minimum
1.5. Fibonacci series is defined as f(n) = f(n-1) + f(n-2) with f(0) = 0
        and f(1) = 1. Hence the series is 0, 1, 1, 2, 3, 5, 8,... Now:
    a. Find the n'th value of the series
    b. Find the sum of first n Fibonacci numbers