🔒 Closed Help

Status
Not open for further replies.
received_354769276329799.webp
Good evening phc ..
baka naman po may maka pansin at nais tumulong d ko kasi maharap mag hanap ng codes eh wala kasi yung loptop ko ..salamat po❤️
 
Add mo lang yung lahat ng total order(syempre multiply kung ilang quantity per food) then subtract sa payment then print mo lang yung totals quantity, food name, price, total price, and yung VAT(may binigay naman na formula)
 
Parang ganito concept. Pero makakaya mo to itranslate to VB


Code:
-----MENU------
[1] Sinigang  - ₱ 50.00
[2] Adobo     - ₱ 40.00
[3] Kaldereta - ₱ 70.00

Input menu order number > 2
How many you want to order? > 100

-----YOUR RECEIPT-----
Customer Name: zack
Ordered Item: Adobo
Ordered Price: ₱ 40
Total Amount: ₱ 4,000
VAT 12%: 428.57
----------------------

Ipagpatuloy mo para sa multiple ordered items.
For single item order lang to

Python:
peso_sign = u"\u20B1"
customer_name = input('Input your name first: ')

def calculate_VAT(total_amount):
    return round(float(total_amount) / 1.12 * .12, 2)

def printMenu():
    print('\n-----MENU------\n'
      f'[1] Sinigang  - {peso_sign} 50.00\n'
      f'[2] Adobo     - {peso_sign} 40.00\n'
      f'[3] Kaldereta - {peso_sign} 70.00\n'
      )

while True:
    printMenu()
    selected_menu = int(input('Input menu order number > '))
    total_menu = input('How many you want to order? > ')

    match selected_menu:
        case 1:
            menu_item = 'Sinigang'
            menu_price = 50
        case 2:
            menu_item = 'Adobo'
            menu_price = 40
        case 3:
            menu_item = 'Kaldereta'
            menu_price = 70
          
    total_amount = int(menu_price) * int(total_menu)

    print(
        '\n-----YOUR RECEIPT-----\n'
        f'Customer Name: {customer_name}\n'
        f'Ordered Item: {menu_item}\n'
        f'Ordered Price: {peso_sign} {menu_price}\n'
        f'Total Amount: {peso_sign} {total_amount:,}\n'
        f'VAT 12%: {calculate_VAT(total_amount)}\n'
        '----------------------\n'
        )
  
    select_again = input('Would you like to order another menu? > ')
    if select_again.lower() != 'y':
        break
    print()
 
Mahirap i convert boss nakaka lito mga functions🥺
Di mo need iconvert. Pag-aralan mo lang yung logic niya.
Once magets mo na, madali mo ng matatranslate.

Ang basic need mo diyan yung: INPUT, WHILE and SWITCH CASE STATEMENT

Para mas madali mong magets, see mo yung output sa taas tapos match mo sa code sa baba
 
Parang ganito concept. Pero makakaya mo to itranslate to VB


Code:
-----MENU------
[1] Sinigang  - ₱ 50.00
[2] Adobo     - ₱ 40.00
[3] Kaldereta - ₱ 70.00

Input menu order number > 2
How many you want to order? > 100

-----YOUR RECEIPT-----
Customer Name: zack
Ordered Item: Adobo
Ordered Price: ₱ 40
Total Amount: ₱ 4,000
VAT 12%: 428.57
----------------------

Ipagpatuloy mo para sa multiple ordered items.
For single item order lang to

Python:
peso_sign = u"\u20B1"
customer_name = input('Input your name first: ')

def calculate_VAT(total_amount):
    return round(float(total_amount) / 1.12 * .12, 2)

def printMenu():
    print('\n-----MENU------\n'
      f'[1] Sinigang  - {peso_sign} 50.00\n'
      f'[2] Adobo     - {peso_sign} 40.00\n'
      f'[3] Kaldereta - {peso_sign} 70.00\n'
      )

while True:
    printMenu()
    selected_menu = int(input('Input menu order number > '))
    total_menu = input('How many you want to order? > ')

    match selected_menu:
        case 1:
            menu_item = 'Sinigang'
            menu_price = 50
        case 2:
            menu_item = 'Adobo'
            menu_price = 40
        case 3:
            menu_item = 'Kaldereta'
            menu_price = 70
         
    total_amount = int(menu_price) * int(total_menu)

    print(
        '\n-----YOUR RECEIPT-----\n'
        f'Customer Name: {customer_name}\n'
        f'Ordered Item: {menu_item}\n'
        f'Ordered Price: {peso_sign} {menu_price}\n'
        f'Total Amount: {peso_sign} {total_amount:,}\n'
        f'VAT 12%: {calculate_VAT(total_amount)}\n'
        '----------------------\n'
        )
 
    select_again = input('Would you like to order another menu? > ')
    if select_again.lower() != 'y':
        break
    print()
Pano to paps?
Wala kasi pc or laptop
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 8
    Replies
  • 539
    Views
  • 5
    Participants
Last reply from:
zackmark29

Trending Topics

Online now

Members online
1,097
Guests online
1,586
Total visitors
2,683

Forum statistics

Threads
2,291,344
Posts
29,070,163
Members
1,210,825
Latest member
dvm0ix
Back
Top