Skip to content

Add discount calculation function in metodos.rb - #7

Merged
NachoOFC merged 1 commit into
mainfrom
NachoOFC-patch-7
Sep 13, 2026
Merged

NachoOFC merged 1 commit into
mainfrom
NachoOFC-patch-7

Conversation

@NachoOFC

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings September 13, 2026 04:11
@NachoOFC
NachoOFC merged commit 3f61d1d into main Sep 13, 2026
1 check passed

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.

🟢 Approval recommended

The only unresolved feedback is a non-blocking naming nit.

Pull request overview

Adds a Ruby function that calculates and prints a discounted final price.

Changes:

  • Adds percentage discount calculation.
  • Demonstrates the calculation with sample values.
  • Prints the original price, discount, and final total.
File summaries
File Summary
metodos.rb Adds the discount calculation example and console output; includes a non-blocking naming nit.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment thread metodos.rb
Comment on lines +2 to +7
def calcular_descuento(precio, porcentaje)
descuento = precio * (porcentaje / 100.0)
precio - descuento # Ruby retorna automáticamente la última línea evaluada
end

precio_final = calcular_descuento(45000, 20)
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