DEV Community

Cover image for The "DevRel Journey" Angle
Dilesh Zingare
Dilesh Zingare

Posted on

The "DevRel Journey" Angle

Hello guy's I am Dilesh Zingare. And this is my first python code and also the first article ever written by me. So yeah I am excited and nervous to but as you know "Beyond fear lies victory." I just passed my 12th exam and I got really embarrassing percentage and as the meme said "Behind every I'm scared is I did it! So like that I am going to share my experience to all of my viewers and for reading this I want to personally Thank you all.

As title said I want to be a "Developer Advocate" and my journey starts from this article and code. I found about DEV Community from researching on platforms like Google and Insta (you know Instagram). So let's move on to the main event.

Now as per my project it's called as "Soul the Restro Waiter" and its amazing as you explore more and deeper. It can do a bunch of cool stuff like instant bill, serving order, serving menu, asking ad responding to different feedback and etc., As per now I am only recently begin to learn python I am not saying that I become a master or something like that It's just if I done anything wrong so you can correct me by using comments or etc techniques you know about.

So ok folks let's wipe the floor together. Here's my exact code from where I created that soul waiter.

So let's get started.

print("WELCOME to our restaurant! Please have a seat and ring the bell when you are ready to order.\n\n\n")

#After bell rings

print("Hello! I am soul, your waiter for today.")

print("May I ask for your name please?") name = input(" ").strip() print("Nice to meet you " + name + "! Here is our menu for today:")

menu = { "Garlic bread with herb butter": 20, "Bruschetta with tomato and basil": 21, "Caprese salad with mozzarella and balsamic glaze": 19.69, "Margherita pizza with fresh tomatoes and basil": 23, "Crispy calamari with lemon aioli": 22, "Stuffed mushrooms with cheese and herbs": 18.79, "Tiramisu with espresso-soaked ladyfingers and mascarpone cream": 20, "Panna cotta with mixed berry sauce": 19, "Cannoli with sweet ricotta filling and chocolate chips": 19.78, "Gelato with assorted flavour": 18.59, "Chocolate lava cake with vanilla ice cream": 21.99, "Espresso": 10, "Cappuccino": 12, "Latte": 13, "Americano": 11, "Mocha": 14, "Iced coffee": 15, }

print("MAIN DISHES:") print("""1. Garlic bread with herb butter 2. Bruschetta with tomato and basil 3. Caprese salad with mozzarella and balsamic glaze 4. Margherita pizza with fresh tomatoes and basil 5. Crispy calamari with lemon aioli 6. Stuffed mushrooms with cheese and herbs.""")

print("DESSERTS:") print("""1. Tiramisu with espresso-soaked ladyfingers and mascarpone cream 2. Panna cotta with mixed berry sauce 3. Cannoli with sweet ricotta filling and chocolate chips 4. Gelato with assorted flavour 5. Chocolate lava cake with vanilla ice cream.""")

print("FOR DRINKS:") print("""1. Espresso 2. Cappuccino 3. Latte 4. Americano 5. Mocha 6. Iced coffee.""")

def get_valid_order(prompt): while True: print(prompt) choice = input(" ").strip() if choice in menu: return choice print("Sorry, that item isn't available. Please enter the full name exactly as shown in the menu.")

def get_valid_quantity(prompt): while True: print(prompt) qty = input(" ").strip() if qty.isdigit() and int(qty) > 0: return int(qty) print("Please enter a valid positive number for quantity.")

order1 = get_valid_order("May I have your order please?") quantity1 = get_valid_quantity("What is the quantity of " + order1 + " you need?")

print("Anything else you want to order sir? If not, press Enter.") second_order = input(" ").strip() order2 = None quantity2 = 0

if second_order: if second_order in menu: order2 = second_order quantity2 = get_valid_quantity("What is the quantity of " + order2 + " you need?") else: print("Sorry, that second item isn't available. I will continue with your first order.")

print("Your order of " + order1 + " x" + str(quantity1) + (" and " + order2 + " x" + str(quantity2) if order2 else "") + " will arrive soon.")

total1 = menu[order1] * quantity1 total2 = menu[order2] * quantity2 if order2 else 0

print("Your total will be rs." + str(total1 + total2) + " only")

print("Please ring the bell if you need something. Have a nice meal.\n\n\n")

print("Please choose and write your feedback from options.")

print("#That was so bad #Bad #Good #That was so good")

feedback = input(" ")

fault = "That was so bad" or "Bad"

if feedback in fault: print("So sorry sir, can you please tell us what was wrong in our survice?") fault = input(" ") print("We will try to improve and make sure no one will ever suffer through that mistake again.") else: print("Thank you so much sir for feedback and for coming in today.")

print("Have a nice day.")
Enter fullscreen mode Exit fullscreen mode

In case of you wondering I picked up the SOUL name from "Bleach" anime from soul reaper. I am one of the biggest fan of the anime industry. If you don't know about anime so you are missing a biggest flex in the world.

let's talk about work I built this code all by my self no help of AI or teacher OH! but i did watches the lectures and he was the hell of a teacher. But folks don't panic I am still here I will teach how to built code of any language from scratch don't worry. I will soon upload lecture videos of how I did built this waiter of ours from start and i will teach all for free.

And the fun part is that the videos length will never excided the 20 min time length no matter the the topic and i guaranteed you will never get bored and will have the fun with me. So that's it for today but don't forget to fix the bug from the code below.

Have fun. Bye.......

print("hello world!")

Goods = Water bottle, Bag pack, Tiffin box .

print(Goods)

Total_cost = 50 + 40+ 10

print("total_cost")
Enter fullscreen mode Exit fullscreen mode

Why didn't it print total price it print total cost statement instated of value.

If you solve this bug comment below how many secs did you take.

Top comments (0)