Skip to content

Refactor currency input and calculation logic - #147

Open
harshmendhe-arch wants to merge 1 commit into
codedex-io:mainfrom
harshmendhe-arch:patch-2
Open

harshmendhe-arch wants to merge 1 commit into
codedex-io:mainfrom
harshmendhe-arch:patch-2

Conversation

@harshmendhe-arch

Copy link
Copy Markdown

No description provided.

Copilot AI lite review requested due to automatic review settings September 18, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃煛 Changes recommended

Currency labels, descriptive variable names, and the exercise header need correction.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Refactors the currency exercise鈥檚 input handling and conversion calculation.

Changes:

  • Separates prompts from input reads.
  • Replaces descriptive currency variables with generic names.
  • Removes the standard exercise header.
File summaries
File Review
2-variables/10_currency.py Currency prompt remains mislabeled as pesos (moderate, 3 votes); generic variable names obscure the exchange-rate mapping (nit, 2 votes); the exercise header was removed (nit, 1 vote).
Review details

Suppressed comments (2)

2-variables/10_currency.py:5

  • The third input is also labeled as pesos even though its value is multiplied by the reais conversion rate. Change this prompt to identify reais so the input denomination matches the calculation.
print("How much do you have left in pesos?")

2-variables/10_currency.py:1

  • Please retain the exercise header: the neighboring files in 2-variables consistently start with a title and # Cod茅dex (for example, 07_temperature.py:1-2 and 08_bmi.py:1-2). Removing it makes this lesson inconsistent and drops its identifying metadata.
print("How much do you have left in pesos?")
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


print("How much do you have left in pesos?")
a1 = int(input(": "))
print("How much do you have left in pesos?")
Comment on lines +2 to +7
a1 = int(input(": "))
print("How much do you have left in pesos?")
a2 = int(input(": "))
print("How much do you have left in pesos?")
a3 = int(input(": "))
total = a1 * 0.00025 + a2 * 0.28 + a3 * 0.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants