Mu is a beginner-friendly Python editor for writing and running programs. Its installation includes Python, and it also offers modes for microcontrollers and other projects. section 1.1 section 1.2
Get started with Mu in a few practical steps:
- Download Mu and follow the platform instructions for Windows, macOS, or Linux. section 1.1
- Open Mu, select Python 3, and confirm the choice. section 1.2
- Write a program, click Run, save it with a .py filename, and inspect the output below the editor. section 1.2
A first coffee-shop program
A small interactive program welcomes customers, asks for their name, drink, flavor, and topping, then prints the order as a receipt. Changing the answers produces a different result each time. section 1.2
Listing 1.1 The first version of the coffee shop application
print("Welcome to Erik's Coffee Shop!")
name = input("Please enter your name: ")
drink = input("Please enter your drink: ")
flavor = input("Please enter your flavor: ")
topping = input("Please enter your topping: ")
print("Here is your order, ", name)
print("Main product: ", drink)
print("Flavor: ", flavor)
print("Topping: ", topping)
print("Thanks for your order!")
Browse the complete first version of the coffee-shop application. section 1.2
