currency at the half cent
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 22/100
Hướng nghiên cứu
Start with the Currency() constructor and its cmp method, which the issue says should round the correct answer to two decimals when the context forbids more than two decimal places. Reproduce the half-cent case with Currency(12.345) under the default tolerance, using the contextCurrency.pl context. Done means $12.35 is accepted, but only after the maintainer agrees on the approach, which the thread has not yet settled.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Sometimes when using contextCurrency.pl, there is algebra that leads to a perl decimal version of an answer, and then you pass that decimal to the Currency() constructor to create an answer where students must use a dollar sign.
Sometimes, you are creating an answer like this one: Currency(12.345). And sometimes (depending on what produced that decimal value and whatever machine rounding error may be in play) the correct answer displays as $12.35, but neither $12.35 nor $12.34 will be accepted as correct when a student enters them, using the default tolerance. They are just at the cusp of the decimal tolerance. Also a student may not enter something like $12.345 with the default flags.
Perhaps the problem author should be aware of all this and round their decimals before passing them to the Currency() constructor. But maybe not, since maybe the Currency() object is supposed to retain deeper decimal precision if it gets used in further calculations. So I'm wondering if we could address this by tweaking the cmp method for a Currency object. What I'm thinking is, if the context disallows entering more than two decimal places, the correct answer should be rounded to two decimal places before it is actually compared to the student answer. Would that idea raise any objections? Of course this is something where I'm interested to hear from @dpvc.
- Ngôn ngữ chính
- Perl
- Star
- 48
- Fork
- 78
- Merge trung bình
- 5 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openwebwork/pg
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
openwebwork/pg#1566 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
openwebwork/pg#1563 · 8 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 50/100
openwebwork/pg#1560 · 10 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
openwebwork/pg#1542 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
openwebwork/pg#1530 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của openwebwork/pg
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
openwebwork/webwork2#3295 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
nftables: "Display comment in rules list?" option has no effect, comments not shown in rules listĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
inverse-inc/packetfence#9707 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mailaddress phrase quotingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
RotherOSS/otobo#6457 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The reply-to for the pro user signup emails should be the email of the user instrad of the contact@ emailCó thể đã có người làm @sisodiaumang đã nhận hôm nay. Đang mở🏭 producer platform - spam
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
openfoodfacts/openfoodfacts-server#15447 ·
Maintainer thường phản hồi trong vòng 1 ngày