Write a python function that takes the limit as an argument of the Fibonacci series and prints till
that limit.
===================================================================
Function Call:
fibonacci(10)
Output:
0 1 1 2 3 5 8
===================================================================
Function Call:
fibonacci(5)
Output:
0 1 1 2 3 5
Write a function called even_checker that takes a number as an argument and prints whether
the number is even or odd inside the function.
===================================================================
Example 1:
Function Call:
even_checker(5)
Output:
Odd!!
===================================================================
Example2:
Function Call:
even_checker(2)
Output:
Even!!
Print all numbers between 1 to 1000 which are divisible by 7 and must not be divisible by 5
Using the IDLE development environment, create a Python script named tryme4.py. (Note: an alternative to IDLE is to use a free account on the pythonanywhere website
Propose an idea related to Artificial Intelligence (AI) and describe the idea with the learning outcomes of the course in detail
JamEx Limited requires a program to calculate and print the commission received by a salesperson. The program should process an undetermined number of salespersons and appropriately terminate by a predefined input. The commission rate is based on two factors, the amount of sales and the class to which a salesperson belongs. The input will be the salesperson number, sales amount and class. The commission rate will be based on the following criteria:
Class=1
If sales is equal to or less than $1000, the rate is 6 percent.
If sales is greater than $1000 but less than $2000, the rate is 7 percent.
If the sales is $2000 or greater, the rate is 10 percent.
Class=2
If the sales is less than $1000, the rate is 4 percent.
If the sales is $1000 or greater, the rate is 6 percent.
Class=3 The rate is 4.5 percent for all sales amount
Class=any other value
Output an appropriate error message.
*need the answer in the form of a pseudocode and python code
Problem : Implement the Knuth-Morris-Pratt algorithm for pattern matching. Search for all occurrences of
a pattern P in a text T.
Input Format: The input text file specifies the pattern P and the text T. The first line of the input file is the
pattern P and the second line specifies the text T. Assume that all characters in the pattern and text are from
the English alphabet and are lower case.
Output Format: Print out the index of every position in the text T where the pattern P occurs. Assume that the
pattern and text have than 10000 characters.
Sample Input 1:
abab
cababbababcbccba
Sample Output 1:
1 6
Sample Input 2:
abab
cabbbbabaacbccba
Sample Output 2:
Pattern not found.
Write a program to accept a tuple, extract the last string item of the tuple and return the string after removing the first character of the string.
Each employee record is consist of the following:
The employee number is composed of the year and month of hiring and control number in the format (YYYYMMNNN)
Where YYYY is the year, MM is the month and NNN is the control number.
Write a program that will answer the questions below.
Note: consider that the current date is 04/21/2022 in the computation.
Write a program to accept a tuple, extract the last string item of the tuple and return the string after removing the first character of the string.