ByteMart Lab 1 - Print, Variables, and Basic Math
Build the first utilities for ByteMart using starter variables only.
Questions
1. Welcome Banner
Print a welcome line for the ByteMart dashboard.
Use the starter variable below and print:
Welcome to ByteMart, Alice!
customer_name = "Alice"2. Stock Change Preview
Given the current stock for one product, print the previous and next possible stock value.
stock = 179Expected output:
178
1803. Shelf Area Calculator
ByteMart wants to estimate triangle display shelf area.
Use the variables and print the area:
base = 3
height = 54. Order Code Digits
An order code has 2 digits. Split and print tens and ones.
order_code = 79Expected output:
7 95. Box Distribution
ByteMart needs to distribute total_items evenly into box_count boxes.
Print:
- number of items per box
- remaining items
total_items = 50
box_count = 66. Cart Total (Dollars and Cents)
A product costs price_dollars dollars and price_cents cents.
ByteMart sells quantity units.
Print:
- total dollars
- remaining cents
price_dollars = 10
price_cents = 15
quantity = 107. Reversed Promo Code
A two-digit promo code is entered in reverse by mistake. Swap the digits and print the corrected code.
promo_code = 79Expected output:
97