I started by creating an outcome for the
customer greeting.
Second, I added name = input() for the
customer's name.
Third, I listed the "parts" that can be purchased.
Fourth, I encoded a command called allparts
similar to "parts" to be the output when the
customer makes a purchase.
Fifth, order = input() for the customer's input.
Sixth, I used a for loop to produce all the
available items the customer wants to buy.
Seventh, if order == allparts[x] to check if the
"order" is equal to any of the "allparts", so that
when the customer enters something, the
program reads it.
, Eighth, I used print to show "order accepted" so
the customer knows their order is available.
Finally, I included an else condition, which will
cause the program to decline and indicate that
the order is unavailable if the item is not
available.
#Let's start a motorcycle parts shop together!!
We're going to build a motorcycle shop using
some now Python programming concepts!!
#Let's build robot motor parts seller!!
print("Hello, welcome to Motorcycle Parts
Shop!!!")
name = input("Let me know your name? \n")
print("Hello, " + name + ", Thank you so much
for coming in today.\n")
parts = """AVAILABLE PARTS: Speedometer,
Sprockets, GearBrake, Frame, FuelTank,
Handle bar, Throttle, Headlights, Spark Plugs,
Oil Filter, Gear Shift Lever. """