currency converter
还没有人认领这个 Issue。
评估
调研方向
Issue 正文提到了 gui.ui、country.txt 和一个 PyQt5 程序。首先检查这些文件和 repository 的入口点,然后明确预期的更改以及预期的货币转换行为;根据目前的 issue 描述,无法定义何时算作 done。
由索引模型根据 Issue 内容生成。
描述
cc program
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5 import QtWidgets, uic
from PyQt5.QtCore import *
import requests
from bs4 import BeautifulSoup
from requests.models import ContentDecodingError
def getVal(cont1, cont2):
cont1val = cont1.split("-")[1]
cont2val = cont2.split("-")[1]
url = f"https://free.currconv.com/api/v7/convert?q={cont1val}_{cont2val}&compact=ultra&apiKey=b43a653672c4a94c4c26"
r = requests.get(url)
htmlContent = r.content
soup = BeautifulSoup(htmlContent, "html.parser")
try:
valCurr = float(soup.get_text().split(":")[1].removesuffix("}")) # {USD:70.00}
except Exception:
print("Server down.")
exit()
return valCurr
app = QtWidgets.QApplication([])
window = uic.loadUi("gui.ui")
f = open("country.txt", "r")
window = uic.loadUi("C:/Users/prath/Desktop/Currency-Calculator-Dynamic/gui.ui")
f = open("C:/Users/prath/Desktop/Currency-Calculator-Dynamic/country.txt", "r")
window.dropDown1.addItem("Select")
window.dropDown2.addItem("Select")
for i in f.readlines():
window.dropDown1.addItem(i)
window.dropDown2.addItem(i)
intOnly = QDoubleValidator()
window.lineEdit.setValidator(intOnly)
def main():
window.pushButton.clicked.connect(changeBtn)
def changeBtn():
val = window.lineEdit.text()
cont1 = window.dropDown1.currentText()
cont2 = window.dropDown2.currentText()
valCurr = getVal(cont1.rstrip(), cont2.rstrip())
window.lcdpanel.display(float(val) * valCurr)
main()
window.show()
app.exec()
- 主要语言
- Python
- 星标
- 35.4k
- 派生
- 12.9k
- 平均合并
- 2 小时 37 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
geekcomputers/Python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
geekcomputers/Python#3205 · 4 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
geekcomputers/Python#3188 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
geekcomputers/Python#3060 · 1 条评论 ·
-
[BUG] shapchat 未关闭
难度 5/5 一周以上 新手友好度 10/100
geekcomputers/Python#3214 · 5 条评论 ·
-
Test of an Issue 未关闭
难度 5/5 一周以上 新手友好度 10/100
geekcomputers/Python#3209 · 5 条评论 ·
查看 geekcomputers/Python 的全部 Issue
相似的 Issue
-
essnmx good first issue
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 2/5 1-3 小时 新手友好度 65/100
syfoud/Simulated_Scepter#174 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Giskard-AI/giskard-oss#2840 · 1 条评论 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success 未关闭area: repo bug perceived difficulty: 2
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
yeti-platform/yeti#1380 ·