A penalty will be applied for the following cases:
Student Name or Student ID is missing
Comments are insufficient
Filename must be exactly A1Q1.py (case-sensitive). For non-matching names (e.g., a1q1.py, A1Q1 .py, A1Q1.PY, or with extra prefixes/suffixes), the score for this question will be multiplied by 0.7 (i.e., only 70% of the earned score will be awarded)
Write a Python program to solve the business problem as described below and save your code in A1Q1.py.
You are required to include your student name and student ID at the top of the python file. Comment your code to demonstrate your understanding.
Linda owns a small fruit stand named “Happy Fruit World” at 10 Main Street, Baltimore, Maryland. She would like to create a flyer showcasing all the fruits she sells. Her goal is to distribute this flyer to attract more customers to visit her stand.
The prices for fruits are listed below:
Apple – 1.29 USD/kg
Pear – 8.59 USD/kg
Orange – 4.99 USD/kg
Coconut – 5.29 USD/kg
Watermelon – 3.2 USD/kg
This flyer may need to be updated periodically to reflect changes in the stand name, fruit selection, prices, or advertising slogans. Therefore, you are required to develop a flyer generator tool that can dynamically produce the flyer based on the specifications.
Figure 1: Output layout for the flyer generator tool
Figure 2: Sample Output
Figure 1 and Figure 2 show the output layout for the flyer generator tool and the sample output respectively. The following steps will guide you to complete the task.
Create variables to store the following information:
The name of the fruit stand
The advertising slogan
The stand address
A decorative dotted line
Initialize each variable with the provided values.
For any repeated values (e.g., "****" or "USD/kg"), store them in separate variables to avoid redundancy.
Define two list variables: one for the fruit names and another for their corresponding prices. Initialize each list with the values provided above, maintaining the listed order. The data type for fruit names should be string, while price values should be represented as float.
Use the sep argument in the print() function with " @ " as its value, making sure there is a space before and after the @ symbol.
Format all prices to display two decimal places using f-strings.
When displaying list elements, access them directly by index. Do not use loops or iterations.
The Long Question [10 marks] requires students to create a Python program that generates a flyer for a small fruit stand called “Happy Fruit World”. The assessment focuses on developing programming skills, proper code documentation, and understanding of Python fundamentals.
Key requirements include:
Penalties:
Missing student name or ID
Insufficient comments
Incorrect filename (must be A1Q1.py, case-sensitive; otherwise, only 70% of earned marks)
Task Overview:
Write a Python program to dynamically generate a flyer based on the provided business problem.
Include student name and student ID at the top of the file.
Use comments to demonstrate understanding.
Business Problem:
Create a flyer for Linda’s fruit stand to showcase her fruits and prices:
Apple – 1.29 USD/kg
Pear – 8.59 USD/kg
Orange – 4.99 USD/kg
Coconut – 5.29 USD/kg
Watermelon – 3.20 USD/kg
The flyer should allow updates for stand name, prices, or advertising slogans.
Program Requirements:
Create variables for stand name, slogan, address, and decorative dotted line.
Store repeated values (e.g., "****" or "USD/kg") in separate variables to reduce redundancy.
Define two lists: one for fruit names (string) and one for prices (float), preserving order.
Format prices to two decimal places using f-strings.
Access list elements directly by index, without loops.
The Academic Mentor guided the student through the assessment step by step to ensure all requirements were met while developing programming competency.
The mentor explained the business problem, emphasizing the need for a dynamic flyer generator.
The student was briefed on penalties and the importance of including their name, ID, and comments.
The mentor clarified the expected output layout and sample outputs.
The mentor guided the student to break the task into components:
Variables for stand name, slogan, address, and decorative line.
Separate variables for repeated values like "****" or "USD/kg".
Two lists for fruit names and prices.
A flowchart or pseudocode approach was suggested to visualize the program structure before coding.
The student wrote the Python program in following these directions:
Declared all required variables and lists.
Used direct indexing to display fruit names and prices.
Applied function for output formatting.
Formatted prices with f-strings to show two decimal places.
Added comments to explain each section, demonstrating understanding.
The mentor encouraged the student to run the program multiple times to ensure correct formatting and accuracy of prices.
Output was compared with the sample flyer layout to verify correctness.
Minor errors (spacing, formatting, variable names) were corrected with mentor feedback.
The student successfully created a dynamic flyer generator that:
Displays fruit names and prices formatted to two decimal places
Uses the argument as specified
Avoids loops and accesses list elements directly
Includes all required variables, comments, and student details
The program is readable, maintainable, and meets the assessment criteria.
Through this assessment, the student achieved the following:
Understanding of Python basics: variables, lists, data types, and formatting.
Code readability and documentation: proper comments and variable usage.
Practical problem-solving: translating a business scenario into a working program.
Output formatting: using and f-strings for professional presentation.
Attention to detail: following naming conventions, file requirements, and output specifications.
Looking for guidance on your assignment? This sample solution is a great reference to help you understand the structure, formatting, and approach needed for high-quality work. Use it to improve your learning, plan your own answers, and gain confidence in tackling similar tasks.
Important: This sample is provided for reference only. Submitting it as your own work may result in plagiarism and academic penalties. Always ensure your final submission is your own original work.
If you want a fully customized, plagiarism-free assignment, our professional academic writers are ready to help. Ordering a fresh solution gives you:
100% original content tailored to your assignment instructions
Expertly formatted, research-backed answers
On-time delivery with full confidentiality
Support from qualified subject specialists
Don’t risk your grades—get the professional guidance you need while learning effectively.
Take action now:
Download Sample Solution Order Fresh Assignment
© Copyright 2025 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.