Quiz 2

Task - discount:

One manufacturer offers goods at a price of 10 euros a piece, and for orders of 50 or more pieces a 10% discount is granted. Several buyers announced that they were coming to buy a certain number of pieces. The customer names and quantities requested are given at the beginning of the program.

Write a function which prints how much the certain customer should pay for the given name of the customer and the quantity of goods .

The customer name is passed to the function here for print purposes only. The price of goods is calculated on the basis of quantity, which is passed on to the function as a second argument.

Task - text underlining:

Write the underline(text) function, which shows the given text underlined.

Hint: The underline function should consist of only two print statements. The first statement should print the given text, and the second one should print the line. You can get a string containing a line by multiplying the string '-' by the length of the given string.