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:
Design a Car model class under package :package6 with the following attributes:
Member Field Name
Type
licenceNumber
String
Model
String
currentMileage
Double
engineSize
Intege
Mark all the attributes as private & create appropriate Getters & Setters
Design another class as Main under package :package6, where you need to implement logic as follows:
Declare an array as Car with size 10.
Take 10 Carà ƒ ¢ € ™s information from user and store them in specified array.
Call findCarList method from Main class to get all cars information related to a given current Mileage & engine Size
Current Mileage & engine Size values should be taken from Main class and pass to findCarList method as argument as well as Car array (with size 10).
Design findCarList method in Car class as follows
Write a c program to check if a given number is a prime or not
Pseudo code and flow chart for the problem of printing odd numbers lezan a given number. It should also calculate their sum and count.
Suppose your name was George Gershwin. Write a complete main method that would print your last name, followed by a comma, followed by a space and your first name.
Write a complete Main method that prints Hello, world to the screen.
Write a program to printout even numbers from 1-1000
- 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.
For this solution, you are required to make use of a switch statement. Write a program that reads in a month of the year as a number (eg 1 for January, 4 for April) and then displays the number of days in that month. Once you have planned the basic solution, take note that leap years has an impact. However, the only impact it has is when a user has specified the value for February – you should then ask the user for the year of interest. You do not need to write specialised functionality to determine whether a year was a leap year, as C# has a build-in method which can be used. In short summary: The DateTime.IsLeapYear() method in C# can be used to check whether the specified year is a leap year.
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.