• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: decimal to octal, I can’t do this code, I’m just learning to program

Resolved: decimal to octal, I can’t do this code, I’m just learning to program

0
By Isaac Tonny on 04/04/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve decimal to octal, I can’t do this code, I’m just learning to program

Question:

the code is, decimal to octal, you want to read a value in decimal (base 10) and convert it to OCTAL (base 8) in phyton
my try this is my original idea for the code

Best Answer:

You are learning to program. So you’d better try to find the solution by yourself or else you will learn nothing from this exercise.
Yes, internet can answer your question easily, you could just ask any AI and it will answer immediatly.
To help you, I’ll give a few tips:
  • you’re not trying to convert a decimal number to an octal number, you’re trying to convert an integer number to an octal string.
  • maybe try a simpler more common problem, like converting an integer to a decimal string.
  • think Division and Accumulation.

Stop reading now, and come back when you have a running solution.


If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to stop a thread that has a blocking function from easygui in python

05/04/2023

Resolved: Removing null keys from a json array of objects

05/04/2023

Resolved: How can I generate at compile-time a separate OpenAPI Swagger.json file for each Controller in my ASP.NET project?

05/04/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.