Escolar Documentos
Profissional Documentos
Cultura Documentos
1. WAP to find the root of a given f(x) = 0 using the bisection method.
2. WAP to find the root of a given f(x) = 0 using the secant method.
3. WAP to solve a system of three linear equations using Gaussian Elimination.
4. WAP to illustrate how the Trapezoidal Rule may be implemented in Python.
5. In cryptography, a Caesar cipher is a very simple encryption techniques in which each letter in
the plain text is replaced by a letter some fixed number of positions down the alphabet. For
example, with a shift of 3, A would be replaced by D, B would become E, and so on. ROT-13
("rotate by 13 places") is a widely used example of a Caesar cipher where the shift is 13. In
Python, the key for ROT-13 may be represented by means of the following dictionary:
6. Write a program that will calculate the variance and average word length of a text stored in a file
(i.e the sum of all the lengths of the word tokens in the text, divided by the number of word
tokens).
7. A pangram is a sentence that contains all the letters of the English alphabet at least once, for
example: The quick brown fox jumps over the lazy dog. Write a function to check EFFICIENTLY
a sentence to see if it is a pangram or not. If not, display the letters which were not present in the
sentence.
8. Given two strings as input, find the longest subsequence common to both.