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
A(n) ____ is software that can be used to block access to certain Web sites that contain material deemed inappropriate or offens
serious [3.7K]

Answer: <em>Internet filter</em>

Explanation:

Internet filters are referred to as software which prevents individuals from accessing certain kind of websites. These filters are predominantly used in order to block content that might be considered inappropriate for some users. These filters are widely used in public library and computers used by schools and colleges.

4 0
3 years ago
What do you mean by an algorithm?<br>​
Over [174]
A program that can be used in many scenarios
8 0
2 years ago
Please please help I don’t understand this
garik1379 [7]

Answer:

It is this because yass

Explanation:

And yes

6 0
2 years ago
Read 2 more answers
How fast will a viral meme spread if it is not contained within 24 hours?
sveta [45]
Well a viral meme would spread very fast, it's a VIRAL meme which means it would spread faster than a normal meme. Even if it is contained in the 24 hour time period it would still become rather popular.
6 0
3 years ago
Read 2 more answers
Suppose we are sorting an array of nine integers using heapsort, and we have just finished one of the reheapifications downward.
Ilia_Sergeevich [38]

Answer:

3

Explanation:

Heap sort pick an item from the first or last position in an array and compares it with other items in other positions in the array, swapping position if they meet the condition.

The array above has three maximum items arranged sequentially in the array, this is prove that there have been 3 reheapifications in the array.

7 0
3 years ago
Other questions:
  • In a paragraph of no less than 125 words, describe how you would insert a graph in your word-processing document.
    8·2 answers
  • Your boss bought a new printer with a USB 3.0 port, and it came with a USB 3.0 cable. Your boss asks you: Will the printer work
    14·1 answer
  • Create a public non-final class named Streamer. You should implement one class method: filterStrings. It should accept a single
    8·1 answer
  • The IT department has rejected the password you submitted for approval to join the network. Your suggestion was "bobbie." Why di
    14·2 answers
  • Help me plase will give brainliest
    12·2 answers
  • A service technician removed the inspection/fill plug from the differential of a rear-wheel- drive vehicle and gear lube started
    8·1 answer
  • A technician receives an invalid certificate error when visiting a website with port 443 enabled. Other computers on the same LA
    8·1 answer
  • "What is the concept of a computer implemented as part of a larger system that is typically designed around a limited set of spe
    13·1 answer
  • Which device is responsible for converting the main electric supply into usable voltage levels inside a computer?
    12·2 answers
  • The {blank} view is the working window of a presentation.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!