Photo AI

2. When stocks of items sold in the kiosk are low, they are reordered from the supplier - Edexcel - GCSE Computer Science - Question 2 - 2019 - Paper 1

Question icon

Question 2

2.-When-stocks-of-items-sold-in-the-kiosk-are-low,-they-are-reordered-from-the-supplier-Edexcel-GCSE Computer Science-Question 2-2019-Paper 1.png

2. When stocks of items sold in the kiosk are low, they are reordered from the supplier. Any items that have passed their sell-by date are disposed of. (a) A comput... show full transcript

Worked Solution & Example Answer:2. When stocks of items sold in the kiosk are low, they are reordered from the supplier - Edexcel - GCSE Computer Science - Question 2 - 2019 - Paper 1

Step 1

Determine if the sell-by date is passed

96%

114 rated

Answer

The input is the sell-by date of each cookie pack. The process is to check if the current date is past the sell-by date, which determines whether the cookie should be disposed of or kept in stock.

Step 2

Number of packs of this type of cookie

99%

104 rated

Answer

The input is the number of packs of the specific type of cookie. The process is to check if this number is less than 10. If true, it prompts to reorder sufficient packs to ensure a minimum of 10 remain in stock.

Step 3

Data about each item

96%

101 rated

Answer

The first character index for the sell-by date in the string is 11 and the last character index is 21. The indexing expression for the first character is 11, and for the last character is 21.

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;