LoslegenKostenlos loslegen

Construct a basic procedural program

Now that you've learned the basics of procedural programming and reinforced those skills with some exercises, it's time to put it all together and build a procedural program! In the following exercise, you will take on the role of a programmer for a catering company, building a new order-taking system and testing it out on your own team first. You will be tasked with constructing a procedure to order a given person's lunch based on their preferences. After that, you will call this procedure as many times as you need to make all of the meals for your team!

Diese Übung ist Teil des Kurses

Programming Paradigm Concepts

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

def order_lunch(name, sandwich_type):
  lunch_order = ____ + ": One " + ____ + " sandwich"
  return lunch_order
Code bearbeiten und ausführen