看板 [ Python ]
討論串[問題] 四則運算的小程式..
共 4 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者purestone (天空之子)時間17年前 (2008/05/12 20:51), 編輯資訊
1
0
0
內容預覽:
在網路上遍尋不到適合的範例,只好自己亂寫一個腦殘的小程式,但還是不喜歡,可以請. 哪位大大幫我改一下嗎??. #!/usr/bin/env python. #File name:calculation. x=int(raw_input('Enter an integer:')). y=int(raw
(還有78個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者doghib (lun)時間17年前 (2008/05/12 21:04), 編輯資訊
1
0
0
內容預覽:
用if 做條件判斷吧. 上面加上. oper = raw_input("Enter oper (+, -, *, /) : "). 輸出變成. if oper == '+':. print "x+y= ", x+y. elif oper == '-':. print "x-y= ", x-y. 下面

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者monomorium (自己的天空)時間17年前 (2008/05/13 11:24), 編輯資訊
0
0
1
內容預覽:
小弟寫了個雛型 供參考. # -*- coding: UTF-8 -*-. """. 檔名:asmd.py. 系統:MS-Windows. 描述:要求使用者輸入兩個數字,然後做四則運算。. """. from os import system. from time import sleep. fro
(還有660個字)

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者purestone (天空之子)時間17年前 (2008/05/14 20:38), 編輯資訊
0
0
0
內容預覽:
謝謝啦~我寫出來了~^^~好高興呢~. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 122.146.32.112.
首頁
上一頁
1
下一頁
尾頁