Make an algorithm program that prompts the user for a number and then displays its multiplication table using a loop.
Write a programme to demonstrate the Dynamic Memory Allocation with some real-time
example. Also, mention the possible ways of intializing and deallocating memory from dynamically
created objects of the class
What is the difference between Virtual Function and Pure Virtual Function? Is it always mandatory
to implement or define all the pure virtual function of the base class into derived class? Justify your
answer.
Choose data members for class Car to define its properties. Create 2 objects of class Car and
overload the operator ‘greater than’ > to compare both the objects concerning their data members
Create 5 objects of class Product, input its product code, name and quantity and write into the
FILE. Later, display the data of all objects by reading from the FILE
Assignment
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: https://www.pythonanywhere.com/)
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.
Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.
The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:
def new_line():
print('.')
def three_lines():
new_line()
new_line()
new_line()
The first line will contain a message prompt to input the size of the matrix.
The succeeding lines will prompt for the elements of the matrix.
The last line will contain the word "MAGIC!" if it is a magic square and "Just a square" if it isn't.
The first line will contain a message prompt to input the number of elements.
The second line will contain message prompts for the elements of the array.
The succeeding lines will contain the arranged elements of the array. Make sure to print the numbers in the order in which they appear in the input. In this case, since 6 appeared first before 12, 6 is printed first.
Given two strings N and K. Your goal is to determine the smallest substring of N that contains all the characters in K. If no substring is present in N print no matches found.
Note: If character is repeated multiple times in K, your substring should also contain that character repeated same number of times.
Input: first line contains two strings N and K
Output: string representing the smallest substring as mentioned above
Input1: stealen lent
Output 1: tealen
Input 2: tomato tomatho
Output 2: No matches found
Question :Create a class Account with the following private member variablesData TypeVariable Namechar[]accountNumberdoubleamountchar[]accountHolderUse appropriate Get and Put function to get and display the values for Account classCreate a function calc() to calculate the interest amount as interest_amount=amount*n*r/100, where n is fixed as 5 and r as 3