3. Write a program using function to calculate the simple interest. Suppose the customer is a senior citizen. She is being offered 15 percent rate of interest; he is being offered 12 percent rate of interest for all other customers, the ROI is 10 percent.
Sample Input:
Enter the principal amount: 200000 Enter the no of years: 3
Gender (m/f): m
Is customer senior citizen (y/n): n Sample Output:
- Create a class Book and initialize it with title, author, and price.
- Create a magic method __eq__, the __eq__ method will check the equality between two objects
- Create a magic method __ge__, the __ge__ method will check >= relationship with another object. (Only comparing the price attribute)
- Create a magic method __lt__, the __lt__ method will check < relationship with another object. (Only comparing the price attribute)
- In all above three magic methods we are comparing two different objects of same class, we need to check / verify here if those objects are from the same class. In all above three magic methods use built-in method isinstance to verify / check if the other object is of same class.
Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.
Provide the Python code and output for your program and all your examples.
Write a python program that takes a string as an input from the user and then modifies the string in such a way that the string always starts with an uppercase letter and the case of each subsequent letter is the opposite of the previous letter (uppercase character followed by a lowercase character followed by an uppercase character and so on). Finally the modified string is printed to show the user.
1. Write a menu driven program to implement of list as a stack containing integers.
iven an integer N denotes N×N matrix. Initially, each cell of matrix is empty. U r given K tasks. In each task, you are given a cell (i,j) where cell (i,j) represents
ith row and jth column of given matrix.
I/p format
O/p format
Print K space-separated integers denoting numberr of empty cells in matrix.
1. Start off by importing the cars.csv file in the jupyter notebook.
2. Generate a line plot graph for the column ‘model’ and ‘hp’.
a. Map the ‘model’ column on the x-axis.
b. Map the ‘hp’ column on the y-axis.
c. Provide the x-axis label as Models of the cars.
d. Provide the y-axis label as Horse-Power of Cars.
e. Set the title as Model Names vs HorsePower.
How to find the maximum and minimum from the list by using loops
Write a program that inputs a numerator and denominator then display their quotient and remainder
Sample output:
Enter numerator: 91
Enter denominator: 6
Quotient is: 15
Remainder is: 1
single digit number
input - the input is a single line containing a positive integer N.
output - the output should be a single line containing a single-numeral number.