1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ilya [14]
4 years ago
11

Octal numbers have a base of eight and the digits 0–7. Write the scripts octalToDecimal.py and decimalToOctal.py, which convert

numbers between the octal and decimal representations of integers. These scripts use algorithms that are similar to those of the binaryToDecimal and decimalToBinary scripts developed in the Section: Strings and Number Systems.
Computers and Technology
1 answer:
Burka [1]4 years ago
4 0

Answer:

See explaination

Explanation:

#input

o_t_n=int(input('Enter a string of octal digits: '))

#required variables

i = 1

dc = 0

#loop for conversion

while (o_t_n != 0):

#to find remainder

rmd = o_t_n % 10

o_t_n //= 10

dc += rmd * i

i *= 8

#print the results

print('The integer value is ',dc)

# decimalToOctal.py

#input

d_c_n=int(input('Enter a decimal integer: '))

print("Quotient Remainder Octal")

#required variables

i = 1

o_c_n = 0

num=""

#loop for conversion

while (d_c_n != 0):

#to find remainder

rm = d_c_n % 8

d_c_n //= 8

o_c_n = o_c_n + rm * i

i *= 10

num = str(rm)+num

print("%5d%8d%12s" % (d_c_n, rm, num))

#print the results

print('The octal representation is ',o_c_n)

You might be interested in
Which letter shows the ball when it has the maximum kinetic energy
DedPeter [7]

Answer:

D.

Explanation:

Kinetic energy can be defined as an energy possessed by an object or body due to its motion.

Mathematically, kinetic energy is given by the formula;

K.E = \frac{1}{2}MV^{2}

Where;

  • K.E represents kinetic energy measured in Joules.
  • M represents mass measured in kilograms.
  • V represents velocity measured in metres per seconds square.

Generally, when the final velocity at which a physical object moves is equal to zero (0), then it possess maximum kinetic energy.

Hence, the letter which shows the ball when it has the maximum kinetic energy in the graph attached is D.

5 0
3 years ago
In addition to letting people share files, what is the most useful feature of
bekas [8.4K]

Explanation:

B. They combine and compress large files into a zip file for sending through email

5 0
2 years ago
Today, there are many computer categories. A(n) ________ is the category for the world's fastest computers. ________ computers a
Musya8 [376]

Answer:

Supercomputer

Mainframe

Servers

Desktop

Laptop

Mac

iOS

Windows

Android

Explanation:

Speed is salient characteristic of supercomputers. The Mainframe computers are usually used by large companies and are very expensive with large processing capability. Servers enables thw possibility of establishing connections with service providers such as Google and other related companies. Desktop computers are those which aren't designed for portability or being easily carried around. The Laptops on the other hand are more compact and easily carried around. Mac are operating systems associated with Apple computers and iOS is the operating system used on iPhones and other Apple smart mobile devices. Windows is the me of the operating system used by Microsoft. Android is also a popular operating system used on smartphones.

3 0
3 years ago
List the six external parts of a computer system and identify which are output and which are input devices.
Igoryamba
External hardware/peripherals are external devices connected to a computer that extend it's functionality. Some common ones are:

1. Monitor - output
2. Keyboard - input 
3. Speakers - output
4. Printer - output
5. Microphone - input
6. Mouse - input

Input is anything that's used to feed/put data into a computer. So for a keyboard that's which keys you're pressing, microphone that's sound data etc. Output is a<span>ny </span>computer<span>-generated data displayed on screen, printed on paper or in machine readable form, such as a disk.</span>
<span />
5 0
3 years ago
______________ is a raw fact about a person or an object
inessss [21]
I think its C information. Sowwy if I’m wrong
4 0
3 years ago
Other questions:
  • Which agricultural CTSO has programs for middle-school and high-school students, as well as college students?
    13·2 answers
  • Given non-negative integers x and n, x taken to the nth power can be defined as: x to the 0th power is 1 x to the nth power can
    7·1 answer
  • Who gave a demonstration of modern computer systems showing a mouse and when?
    8·1 answer
  • Look at the data set below. {6, 7, 12, 5, 7, 11, 10, 7, 6} In this data set, what is the mode?
    9·2 answers
  • Which of the following is a strategy used to enhance communication in a presentation?
    14·1 answer
  • Different types of names given to explicit convertion in java<br>​
    6·1 answer
  • Building relationships during your career exploration is called A. clustering. B. futurecasting. C. matchmaking, D. networking.
    9·2 answers
  • What happens when in Word 2016 when the home ribbon tab is clicked on?
    13·1 answer
  • What is string literal in Java?
    5·1 answer
  • 2 red and 2 overlapping balls in the center are surrounded by a green, fuzzy, circular cloud with a white line running through i
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!