導航:首頁 > 編程語言 > 用python製作飯店列印小票的軟體

用python製作飯店列印小票的軟體

發布時間:2024-03-20 23:48:21

python 列印報表 有什麼好的報表軟體嗎

你好,你可以用python 去調用fastreport.dll。下面是一個例子。
import clr
import threading

def fastRepot_run():
report = Report()
report.Load("test.frx")
report.Show();
clr.FindAssembly("FastReport.dll")
from FastReport import *
threading.Thread(target=fastRepot_run).start()

⑵ C#製作一個列印購物小票

usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;

namespacePrintBill
{
classProgram
{
intItemId;
intAmount;
intnongfushanquan=0;
intjinmailang=0;
intshuanghuihuotuichang=0;
strings=string.Empty;

privatevoidbusiness()
{
Console.Write("輸入商品編號:");
ItemId=Convert.ToInt32(Console.ReadLine());
Console.Write("輸入商品數量:");
Amount=Convert.ToInt32(Console.ReadLine());
if(ItemId==1)
{
nongfushanquan=nongfushanquan+Amount;
}
if(ItemId==2)
{
jinmailang=jinmailang+Amount;
}
if(ItemId==3)
{
shuanghuihuotuichang=shuanghuihuotuichang+Amount;
}
Console.WriteLine("輸入e停止購物,輸入其他任意鍵繼續購物:");
s=Console.ReadLine();
}

privatevoidProceBill()
{
doublesum1=0;
doublesum2=0;
doublesum3=0;

Console.WriteLine("----------------歡迎光臨光輝超市----------------");
Console.WriteLine("商品名稱單價數量小計");
if(nongfushanquan!=0)
{
sum1=nongfushanquan*1.02;
Console.WriteLine("農夫山泉1.02"+""+nongfushanquan+""+"¥"+sum1);
}
if(jinmailang!=0)
{
sum2=jinmailang*3.5;
Console.WriteLine("今麥郎碗面3.50"+""+jinmailang+""+"¥"+sum2);
}
if(shuanghuihuotuichang!=0)
{
sum3=shuanghuihuotuichang*0.5;
Console.WriteLine("雙匯火腿腸0.50"+""+shuanghuihuotuichang+""+"¥"+sum3);
}

doubletotalSum=sum1+sum2+sum3;
Console.WriteLine("總計:¥"+totalSum);

}

staticvoidMain(string[]args)
{
Console.WriteLine("編號商品名稱");
Console.WriteLine("1農夫山泉");
Console.WriteLine("2今麥郎碗面");
Console.WriteLine("3雙匯火腿腸");
Console.WriteLine("");
Programp=newProgram();
p.business();
while(p.s!="e")
{
p.business();
}
p.ProceBill();
}
}
}

運行結果:

建議你自己再寫寫。

⑶ 用python列印九九乘法表代碼

1、編寫乘法表函數

def buildMulTable():
for i in range(1, 10):
for j in range(1, i + 1):
print('{}x{}={}\t'.format(j, i, i * j), end='')
print()

buildMulTable()

2、運行結果
1x1=1
1x2=2 2x2=4
1x3=3 2x3=6 3x3=9
1x4=4 2x4=8 3x4=12 4x4=16
1x5=5 2x5=10 3x5=15 4x5=20 5x5=25
1x6=6 2x6=12 3x6=18 4x6=24 5x6=30 6x6=36
1x7=7 2x7=14 3x7=21 4x7=28 5x7=35 6x7=42 7x7=49
1x8=8 2x8=16 3x8=24 4x8=32 5x8=40 6x8=48 7x8=56 8x8=64
1x9=9 2x9=18 3x9=27 4x9=36 5x9=45 6x9=54 7x9=63 8x9=72 9x9=81

⑷ 怎麼用python列印出乘法表

循環輸出就好,雙重循環

for i in range(1,10):

for j in range(1,i+1):

print i, "*", j, "=", i*j,

print

閱讀全文

與用python製作飯店列印小票的軟體相關的資料

熱點內容
拍照文件夾哪個好用 瀏覽:83
文件夾和書包 瀏覽:504
解壓歸檔拿登記證 瀏覽:217
去體驗解壓房 瀏覽:607
單片機一鍵中斷響應 瀏覽:640
唐浩明pdf 瀏覽:838
程序員土木 瀏覽:71
android如何與web伺服器交互 瀏覽:603
蘋果小風扇app怎麼下 瀏覽:950
杭州it程序員對身體好不好 瀏覽:534
高新區編程加盟找哪家 瀏覽:26
伺服器什麼樣的好賣 瀏覽:145
單片機原理及應用第二版例題答案 瀏覽:964
base64encoderjava 瀏覽:488
linux視頻轉換 瀏覽:700
linux與unixshell編程指南 瀏覽:137
vb6反編譯程序錯誤 瀏覽:125
伺服器弄掛有什麼影響 瀏覽:306
安卓軟體為什麼運行不了 瀏覽:530
什麼安卓手機是四方的 瀏覽:481