Question: 1 . Write a program in python to compute the following series using for / while loop ( Fibonacci numbers ) [ 1 +

1. Write a program in python to compute the following series using for/while loop (Fibonacci numbers)
\[
1+1+2+3+5+8+13+\ldots \text { up to }15^{\text {th }}\text { term }
\]
2. Write a program in python to reverse a given integer without converting them into a string. Example: 1356 will be converted into 6531.
3. Consider the following string:
"The successful warrior is the average man, with laser-like focus."
i. Write an expression to print the \(10^{\text {th }}\) character of the string
(Expected output: 's')
ii. Write an expression to print the first 21 characters of the string
iii.Using positive index values, write an expression to print the last 17 characters of the string
iv.Using negative index values, write an expression to print the last 17 characters of the string
v.Write an expression to print the string in reverse
vi.Write an expression to find the length of the string
vii.Write an expression to convert the entire string to uppercase
viii.Write an expression to check if the word "fail" is in the string.
4. Write a Python program that checks to see if a number N is prime. A simple approach checks all numbers from 2 up to N , but after some point numbers are checked that need not be checked. For example, numbers greater than \(\sqrt{}\mathrm{N}\) need not be checked. Write a program that checks for primality and avoids those unnecessary checks. Remember to import the math module.
5. Write a program in python to compute the following multiplication series. \(1*4*9*16^{*}25^{*}\ldots \) up to 8 terms.
1 . Write a program in python to compute the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!