livepython.net

78. Python Program to Check If an Item Is on the Menu

EasyList tools

Overview

Check whether a value is in a list with in.

Problem Statement

A café menu is the list ["tea", "coffee", "juice", "lassi"]. Read an order. If it is on the menu, print One <order> coming up!; otherwise print Sorry, <order> is not on the menu. (with the order in place of <order>). For example, for coffee:

One coffee coming up!

Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.

Input

One value per line, in this order. Example:

coffee

Output

The output for that example:

One coffee coming up!

The tests try 4 different inputs.

Learn this firstChapter 9 · Python List Functions: in, sort, min, max, sum
solution.py
# write your code here

EXPECTED OUTPUT

1One coffee coming up!

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.