Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacktoberfest: Added Octal Number to Hexadecimal Number Conversion Algorithm #10533

Merged
merged 8 commits into from
Oct 17, 2023
Prev Previous commit
Next Next commit
Update conversions/octal_to_hexadecimal.py
fix: improvement updates to octal to hexadecimal

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
  • Loading branch information
developer-kush and tianyizheng02 authored Oct 15, 2023
commit 0b7eefc237f781daddc31d97f909bacbdc55ccce
10 changes: 2 additions & 8 deletions conversions/octal_to_hexadecimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,5 @@ def octal_to_hex(octal: str) -> str:

assert hexadecimal == expected

print(
"Hex of '0o"
+ num
+ "' is : "
+ hexadecimal
+ " - and Expected was : "
+ expected
)
print(f"Hex of '0o{num}' is: {hexadecimal}")
print(f"Expected was: {expected}")