- 2

Can anyone convert this code into while loop?

import time def pos (username, burger_type, quantity): print() print(time.strftime( '%:%M %p, %a, %d/%b/%Y')) print("NAME:", username) if burger_type=='big': quan=quantity amount=quan*100 GST_Amount = (amount*13)/100 net_Price + GST_Amount elif burger_type=='small': quan=quantity amount=quan*100 GST_Amount = (amount*13)/100 net_Price = amount+ GST_Amount print("BRUGER TYPE :" ,burger_type) print("QUANTITY:",quantity) print("AMOUNT:",amount) print("GST(13%)AMOUNT:",GST_Amount) print("TOTAL AMOUNT: " , net_Price) name = 'Max' type = 'small' quantity = 2 pos(name, type, quantity)

23rd Dec 2021, 9:49 PM
SAfiullaH KhoKhar
SAfiullaH KhoKhar - avatar
4 Respuestas
+ 2
What for?
23rd Dec 2021, 10:11 PM
Emerson Prado
Emerson Prado - avatar
+ 1
ask your friend
23rd Dec 2021, 11:24 PM
Slick
Slick - avatar
+ 1
SAfiullaH KhoKhar The most important skill required for programming is logic thinking. Using while loops, or any structure, depends on what you want the code to do. You showed a code and asked people to use a specific loop, knowing absolutely nothing about what it should do. How is someone supposed to help at all? If the only reason for using while is that your friend has it, then I back Slick answer - your friend is the only one who can help.
24th Dec 2021, 2:30 AM
Emerson Prado
Emerson Prado - avatar
0
Coz my friend has this
23rd Dec 2021, 10:12 PM
SAfiullaH KhoKhar
SAfiullaH KhoKhar - avatar