Discord Server Red Security Twitter Donation to Red Security Red Security Youtube Channel Red Security Tumblr Profile
Login or Register to Hide ads and Accessing all features on the forum

Tutorial 

Amazing Python Program For beginners

0 Replies, 688 Views

[Image: 1*RJMxLdTHqVBSijKmOO5MAg.jpeg]

In this program all the concepts which we discussed in previous threads are included so make sure to run it and try to understand each line of code don't just copy paste it if you have any problem in code just ask


Code:
# Program to automate our coffee shop
print("Hi, There Welcome to our coffee shop")

name = input("What is your name?\n")


if name == 'covid':
  print("Hey, are you evil or not? ")
  status = input()
  if status == 'yes':
    print("Evils are not welcomed here get lost")
    exit()
  elif(status == 'no'):
    print("Hy "+ name +""", So you are of that good ones thank you so much for coming in today. \n\n\n""" )
else: 
    print("Hello "+ name +""", thank you so much for
coming in today. \n\n\n""" )
order = input ("""We have the following menu
1. Black Coffee
2. Espresso
3. Latte
4. Cappucino             
What would you like to take?\n""")

if order == 'Black Coffee':
  price == 5
elif order == 'Espresso':
  price == 8
elif order == 'Lattee':
  price == 10
elif order == 'Cappucino':
  price == 12
else:
price = 10
quantity = int(input("How many cup of coffee you wants: "))
print("Ok sir your order for " + order + " will be provided soon,")
bill = quantity * price
print("Hope you enjoy our services, Here\'s your bill: "+"$" +
str(bill))
print(name + " we will have your " +
str(quantity) + " " + str(order) + " ready for you in a moment")


("Allah Hafiz" and "Good Bye" Till the next post )
"Keep Learning and Keep exploring"
Love me like you do Heart

Possibly Related Threads…
Thread Author Replies Views Last Post
  Tutorial Doubly Linked List in Python Covid-19 0 2,251 07-30-2022, 09:15 PM
Last Post: Covid-19
  Tutorial Linked List in Python Covid-19 2 2,648 07-30-2022, 08:25 PM
Last Post: Covid-19
  Tutorial File Handling in Python Covid-19 2 2,683 06-16-2022, 06:17 PM
Last Post: Covid-19
  Tutorial Exceptions in Python Covid-19 0 1,852 06-08-2022, 09:19 PM
Last Post: Covid-19
  Free Automate the boring stuff with Python Covid-19 0 1,611 06-07-2022, 06:58 PM
Last Post: Covid-19
  Tutorial Turtle in Python Covid-19 0 1,849 06-02-2022, 10:14 PM
Last Post: Covid-19
  Tutorial Python 3.5: Class Methods Covid-19 0 1,797 05-29-2022, 01:07 PM
Last Post: Covid-19
  Tutorial Python 3.2: Inheritance in Python Covid-19 2 2,837 05-27-2022, 06:47 PM
Last Post: Covid-19
  Tutorial Python 3.4: Encapsulation and Abstraction Covid-19 0 1,831 05-27-2022, 06:45 PM
Last Post: Covid-19
  Tutorial Python 3.3: Operator Overloading Covid-19 2 2,834 05-26-2022, 08:50 PM
Last Post: Covid-19



Users browsing this thread: 1 Guest(s)