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
elena-s [515]
3 years ago
15

Is_sum_odd that takes a non-negative integer number as parameter and returns true if the sum of individual digits is odd, false

otherwise.
Computers and Technology
1 answer:
lara31 [8.8K]3 years ago
6 0
Make sure that you understand how addDigits( number, base ) works!

```
#!/usr/bin/python

import sys


def addDigits( number, base ):
    if( number ):
        return( addDigits( number // base, base ) + ( number % base ) )
    else:
        return( 0 )


def wrapper( number, base=10 ):
    if( ( addDigits( number, base ) ) % 2 ):
        return True
    else:
        return False


if( __name__ == "__main__" ):
    if( len( sys.argv ) != 2 ):
        sys.stderr.write( "usage: " + sys.argv[ 0 ] + " <integer>\n" )
        exit( 127 )

    print wrapper( int( sys.argv[ 1 ] ) )
```

You might be interested in
Draw a flowchart that solve the problem of calculating the average of 5 numbers.
KatRina [158]

Answer:

Draw a flowchart that solve the problem of calculating the Area of circle

Pie x r x2

Explanation:

3 0
2 years ago
Which of the following refers to a combination of hardware and software that ensures only authorized individuals gain entry into
MrRa [10]

Answer:

B. Firewall

Explanation:

Firewall, just like encryption prevents unauthorized entry into a computer. However, Firewall can be implemented in both hardware or software form; or even a combination of both.

7 0
3 years ago
Write a WHILE loop that lets the user enter a number.
balandron [24]

Answer:

while True:

   number = int(input("Enter a number: "))

   product = number * 10

   if product > 100:

       break

print(str(product))

Explanation:

Create a while loop that iterates until a specific condition is created inside

Ask the user for the input

Multiply the input and put the result in product

Check if the product is greater than 100. If it is, stop the loop using break keyword

When the loop is done, print the product

7 0
4 years ago
The area that holds all the instructions the computer needs to start up when it is powered on is ________.
stepan [7]

The area that holds all the instructions the computer needs to start up when it is powered on is b) ROM

Further Explanation:

RAM and ROM are the types of memory. RAM is the active memory. The data can be read and written from RAM. While ROM is read only which meas that data or instructions on ROM cannot be changed.

The files or instructions that are needed to start up a computer are usually unchangeable as they always have to be the same. These type of instructions are stored in ROM. When he computer is turned on, the instructions needed to start the computer are loaded into the main memory from the ROM.

Hence, ROM is the correct answer.

Learn more at:

  • brainly.com/question/10196212
  • brainly.com/question/10250188

#LearnwithBrainly

7 0
3 years ago
Question 12
AlladinOne [14]

Which is a multicast address ?

ans: 241.2.2.1

6 0
2 years ago
Other questions:
  • A ____ is harmful computer code that spreads without your interaction, slipping from one network to another and replicating itse
    15·1 answer
  • Which of the following is a goal of paraphrasing​
    12·1 answer
  • Why are computer messages encapsulated?
    13·1 answer
  • ________ are the most popular method used by visitors to find web sites.
    6·1 answer
  • Hard light is usually not good for filming. True False
    11·2 answers
  • User Interface Design ensures that the interface has elements that are easy to ________________. (Choose all that apply)
    10·2 answers
  • Suppose you are developing a data visualization application DataViz which calls some functions from a statistics library class S
    5·1 answer
  • WAFL (write-anywhere file layout) Select one: a. is a distributed file system b. is a file system dedicated to single user opera
    6·1 answer
  • Def pig_latin(word): """ ------------------------------------------------------- Converts a word to Pig Latin. The conversion is
    15·1 answer
  • What are the paparazzi?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!