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, 679 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,227 07-30-2022, 09:15 PM
Last Post: Covid-19
  Tutorial Linked List in Python Covid-19 2 2,607 07-30-2022, 08:25 PM
Last Post: Covid-19
  Tutorial File Handling in Python Covid-19 2 2,645 06-16-2022, 06:17 PM
Last Post: Covid-19
  Tutorial Exceptions in Python Covid-19 0 1,824 06-08-2022, 09:19 PM
Last Post: Covid-19
  Free Automate the boring stuff with Python Covid-19 0 1,590 06-07-2022, 06:58 PM
Last Post: Covid-19
  Tutorial Turtle in Python Covid-19 0 1,823 06-02-2022, 10:14 PM
Last Post: Covid-19
  Tutorial Python 3.5: Class Methods Covid-19 0 1,772 05-29-2022, 01:07 PM
Last Post: Covid-19
  Tutorial Python 3.2: Inheritance in Python Covid-19 2 2,801 05-27-2022, 06:47 PM
Last Post: Covid-19
  Tutorial Python 3.4: Encapsulation and Abstraction Covid-19 0 1,804 05-27-2022, 06:45 PM
Last Post: Covid-19
  Tutorial Python 3.3: Operator Overloading Covid-19 2 2,799 05-26-2022, 08:50 PM
Last Post: Covid-19



Users browsing this thread: 1 Guest(s)