Assignments 2 : For Loop & If Statement

Write the answers of the questions in the available space.
In this assignment, we are trying to make a simple code for a Taiyaki restaurant
  1. Make a list of taiyaki flavor consisting of vanilla, chocolate, red-bean paste, macha, peanut, and strawberry. Using for loop, print them all in the following way:
    We have the following taiyaki:
    - Vanilla Taiyaki
    - Chocolate Taiyaki
    ...
  2. Make another list called my_orders, and put vanilla, macha, chocolate, and strawberry in it. Then print
    The orders are:
    vanilla macha chocolate strawberry

    Number of flavors:
    4

    Use len instead of manually write 4.
  3. Write if statement as follows: if the length of orders is at least 3 (>= 3), print
    Sorry, we can only accept up to two flavors." Otherwise, print
    We accept the orders. Test that using my_orders.
  4. Copy the code in no. 2 and no.3, and check it with the following new orders and see if it still works:
    friend_orders = ['macha', 'peanut'].
  5. Copy the code in no. 2 and no.3. Improve the print statements as follows:
    We will only accept your first two orders. then print the slice of the first two items in the list like this:
    Accepted orders: vanilla macha
    Then, print
    We will not process your third orders and on.
    then print the slice of the list from the third orders and on like this:
    Denied orders: chocolate strawberry
  6. Test again your code in no. 5 using this list: "friend_orders_2 = ['macha', 'peanut', 'chocolate', 'strawberry', 'red-bean paste']".
  7. Write an if statements that said that:
    if the order contains macha, print
    Sorry, we are running out of macha taiyaki today.
    Otherwise, print
    We are processing your order.
    Try that using friend_orders_2.
  8. Write an if statement:
    if the orders is more than (>) 3 and contains macha, print
    You have more than three orders and unfortunately we are running out of macha taiyaki today.
    Otherwise, print
    We are processing your order.
    Try that using friend_orders_2.
  9. Make a list of multiple of 5 from 100 (inclusive) to 200. Then print:
    While waiting for your order. Here's a list of multiple of 5 from 100 to 200:
    followed by printing the list.
  10. Using the list in no.1 and this list:
    friend_orders_3 = ['macha', 'strawberry', 'peanut', 'blueberry']. , make a for loop and if statement that print the following outputs:
    Processing your macha taiyaki.
    Processing your strawberry taiyaki.
    Processing your peanut taiyaki.
    Sorry, blueberry taiyaki is not available.
Submission Deadline

Thursday,
October 22, 2020
16:20