Given a string S, find the longest palindromic substring in S. Substring of string S: S[ i....j] where 0 sisj< len(S). Palindrome string: A string which reads the same backwards. More formally, S is palindrome if reverse(S) =S. Incase of conflict, return the substring which occurs first ( with the least %3D starting index).
Draw a flowchart and construct a python program to read the three subject’s marks secured by n students during FAT examination. If a student secured less than 50 in any subject, the student is failed in that subject. Count the number of students who failed in each subject and the total number of students who failed in at least one subject.
Given an integer number N as input.write a program to print the hollow rigthangled triangular pattern of N lines as shown below
Describe how catching exceptions can help with file errors. Write three Python examples that actually generate file errors on your computer and catch the errors with try: except: blocks. Include the code and output for each example in your post.
Describe how you might deal with each error if you were writing a large production program. These descriptions should be general ideas in English, not actual Python code.
Bonus Salary
A company decided to give a bonus of 5% to an employee if his / h * e * r
years of service is more than five years. Write a program that reads an employee's salary and years of service and decides whether the employee gets the bonus or not.
Input
The first line of input will contain the salary of an employee. The second line of input will contain years of service.
Output
If the employee gets a bonus, print the net bonus amount. If the employee doesn't get the bonus, print "No Bonus",.
Explanation
For example, if the employee's salary is 25000 and years of experience is 3. As the years of experience is less than 5, the output should be "No Bonus".
Similarly, if the employee's salary is 50000 and years of experience is 6. As the years of experience is more than 5, the employee is eligible for the bonus. By computing the 5% of his salary, the net
Write a program that asks the user to enter the products that are bought and their price
Then to write the price that he wants to sell
Every product should have a name, price, tax, profit limit
In addition, when a customer enters to buy many items the program should output the bill
At the end of every month, there should be a calculation of the gained and lost money.
Hand game
Write a program to implement a calculator using functions. Following operations should be implemented: a. Addition of two numbers b. Subtraction of two numbers c. Modulus of two number d. Multiplication of two numbers
python program at least 50 lines with tuple,dictionary,mathematical operation,list and format
Write a program in python to display the output in the following format?
Take the input from user:
Name Age Email Address
John Doe 23 John@gmail.com
William Edward 30 William@gmail.com