Skip to content

Add solution for Challenge 18 by clgp-aint-cool#1570

Merged
github-actions[bot] merged 2 commits intoRezaSi:mainfrom
clgp-aint-cool:challenge-18-clgp-aint-cool
Apr 13, 2026
Merged

Add solution for Challenge 18 by clgp-aint-cool#1570
github-actions[bot] merged 2 commits intoRezaSi:mainfrom
clgp-aint-cool:challenge-18-clgp-aint-cool

Conversation

@clgp-aint-cool
Copy link
Copy Markdown
Contributor

Challenge 18 Solution

Submitted by: @clgp-aint-cool
Challenge: Challenge 18

Description

This PR contains my solution for Challenge 18.

Changes

  • Added solution file to challenge-18/submissions/clgp-aint-cool/solution-template.go

Testing

  • Solution passes all test cases
  • Code follows Go best practices

Thank you for reviewing my submission! 🚀

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

Walkthrough

A new Go source file for challenge 18 was added implementing temperature conversion functions between Celsius and Fahrenheit with a Round helper and a demonstration main program that displays conversions.

Changes

Cohort / File(s) Summary
Temperature Conversion Solution
challenge-18/submissions/clgp-aint-cool/solution-template.go
Added three exported functions: CelsiusToFahrenheit() and FahrenheitToCelsius() implementing conversion formulas with two-decimal rounding, and a Round() helper. The main() function demonstrates both conversion directions with formatted output.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • #1179: Adds identical temperature conversion solution file with the same CelsiusToFahrenheit, FahrenheitToCelsius, and Round functions.
  • #691: Adds the same temperature-conversion functions and Round helper in a separate challenge-18 submission file.
  • #651: Introduces matching temperature conversion functions plus identical Round helper and main demonstration for challenge-18.

Poem

🐰 A rabbit hops through numbers clear,
Converting temps both far and near—
Celsius meets Fahrenheit's scale,
With rounding magic, none shall fail! 🌡️✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a solution for Challenge 18 by clgp-aint-cool, which matches the file addition and PR objectives.
Description check ✅ Passed The description is related to the changeset, providing context about the Challenge 18 solution submission, the file location, and claiming test compliance.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b7c2869e-e9c3-469d-a787-babf0aa0ee9b

📥 Commits

Reviewing files that changed from the base of the PR and between 6a002af and cbdf8ef.

📒 Files selected for processing (1)
  • challenge-18/submissions/clgp-aint-cool/solution-template.go

Comment on lines +28 to +29
// TODO: Implement this function
// Remember to round to 2 decimal places
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove stale TODO comments in implemented logic.

The TODO text says the function is unimplemented, but Line 30 already contains the implementation. Keeping this is misleading during maintenance.

🧹 Suggested cleanup
 func FahrenheitToCelsius(fahrenheit float64) float64 {
-	// TODO: Implement this function
-	// Remember to round to 2 decimal places
 	return  Round((fahrenheit-32)*5/9,2)
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// TODO: Implement this function
// Remember to round to 2 decimal places

@github-actions github-actions Bot merged commit 994e54b into RezaSi:main Apr 13, 2026
6 checks passed
@github-actions
Copy link
Copy Markdown

🎉 Auto-merged!

This PR was automatically merged after 2 days with all checks passing.

Thank you for your contribution, @clgp-aint-cool!

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