Refactor currency input and calculation logic - #147
Open
harshmendhe-arch wants to merge 1 commit into
Open
harshmendhe-arch wants to merge 1 commit into
harshmendhe-arch wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
馃煛 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-variablesconsistently start with a title and# Cod茅dex(for example,07_temperature.py:1-2and08_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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.