The garments company Apparel wishes to
open outlets at various locations. The company
shortlisted several plots in these locations and
wishes to select only plots that are square-
shaped.
Write an algorithm to help Apparel find the
number of plots that it can select for its outlets.
a) Make a general store receipt of the customer who has bought several items. The Output should contain regular price of an item, the department code, and calculated the discount price. The receipt should be proper formatted using Escape sequence
ahmad Is looking for a computer application to get a better sense of the weekly and monthly sales patterns at his flower shop what type of program will help him best
Q.3. Develop an ER diagram for Salat management system
#(a) Ask the user for their name and output the name 5 times.
#Extension:
#(b) Allow the user to specify the number of outputs. (1T, 1K)
Scenario:
Your friend is developing a maze puzzle game and already designed a module which can generate a random maze. The maze has one entry and one exit point. Now he needs to develop the module which will find the path from entry to exit points for randomly generated maze. Your friend wants the path searching should be quickest. He can use only Stack or Queue data structures to store maze’s visited locations for path generation. He is unable to decide the selection of data structure and asked you to help him.
Question:
From Stack and Queue data structures which data structure you will suggest using for entry to exit path finding module? Select a data structure and give comments in favour to justify your selection. Also mention why you are not selecting the other data structure?
You have a large collection of pennies and wish to change them into dollar bills at the bank, with quarters, dimes, nickels, and pennies being used for any remainder. Prompt for the number of pennies and produce output as shown below.
Output:
How many pennies do you have (must be greater than 100)? [Assume user inputs 641]
641 pennies can be changed at the bank as follows:
Dollars: 6
Quarters: 1
Dimes: 1
Nickels: 1
Pennies: 1
A street vendor sells three types of juice: apple, grape, and orange. They all sell for $2.49. Ask the vendor how much of each were sold today and then calculate the sales ($) for each. Format your output as shown below, making sure Sales numbers have exactly two decimal places and that all widths / alignments match mine.
Output:
How much apple juice did you sell today? [assume user inputs 5]
How much grape juice did you sell today? [assume user inputs 8]
How much orange juice did you sell today? [assume user inputs 10]
FRUIT QTY SALES($)
Apple 5 12.45
Grape 8 19.92
Orange 10 24.90
-------------------------
1234567890123456789012345 <-- DO NOT output this area. It is here to help you align things.
Practice basic output formatting by reproducing the output below. All floating-point numbers should have 3 decimal places. Use these constants and values: NUM1= 10, NUM2= 1.49, and NUM3= 12.538767
Output:
NUM1 NUM2 NUM3
10 1.490 12.539
------------------------
123456789012345678901234 <-- DO NOT output this area. It is here to help you align things.
This is a silly program to help you practice with combined assignment operators, such as +=. Use ONLY these types of operators as you manipulate the user's lucky number by always using the number 10. See output below for details.
Output:
Enter a lucky number (must be whole number) and I will manipulate it using my number: [assume user inputs 7]
Your lucky number + 10 equals 17
Now I will multiply the previous result by 10, which equals 170
Next I subtract the previous result by 10, which equals 160
Lastly, I divide the previous result by 10, which equals 16