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
Luda [366]
2 years ago
9

Which code segment results in "true" being returned if a number is odd? Replace "MISSING CONDITION" with the correct code segmen

t.
a) num % 2 == 0;
b) num % 2 ==1;
c) num % 1 == 0;
d) num % 0 == 2;

Computers and Technology
1 answer:
seropon [69]2 years ago
4 0

Answer:

b) num % 2 ==1;

Explanation:

Which code segment results in "true" being returned if a number is odd? Replace "MISSING CONDITION" with the correct code segment.

You might be interested in
17.8.1: Writing a recursive math function. Write code to complete raise_to_power(). Note: This example is for practicing recursi
Yuliya22 [10]

Answer:

The recursion function is as follows:

def raise_to_power(num, power):

if power == 0:

 return 1

elif power == 1:

 return num

else:

 return (num*raise_to_power(num, power-1))

Explanation:

This defines the function

def raise_to_power(num, power):

If power is 0, this returns 1

if power == 0:

 return 1

If power is 1, this returns num

elif power == 1:

 return num

If otherwise, it calculates the power recursively

else:

 return (num*raise_to_power(num, power-1))

6 0
3 years ago
Determine whether the compound condition is True or False.
Vlada [557]

The  compound condition are:

  • 7<12 or 50!=10 is false
  • 7<12 and 50<50 is false
  • not (8==3) is true

<h3>What is compound condition?</h3>

A compound statement is known to be one that shows up as the body of another statement, e.g. as in if statement.

The  compound condition are:

  • 7<12 or 50!=10 is false
  • 7<12 and 50<50 is false
  • not (8==3) is true

Learn more about compound condition  from

brainly.com/question/18450679

#SPJ1

8 0
1 year ago
You must establish credit in order to buy a house true or false
iren2701 [21]

verry true, unless ou dont need a loan, if you have cash then the answer is false

8 0
3 years ago
Who knows my aunt better?
fiasKO [112]

Answer:

yes, yes, 30, November 5

6 0
2 years ago
Read 2 more answers
Select Packet 10 in the Wireshark top pane and then answer the following questions: Did this handshake complete properly? What i
Yuki888 [10]

Answer:

Yes

32 bytes

No

40 bytes

6 0
3 years ago
Other questions:
  • What does the picture indicate on the famous book “Dawn of the century”?​
    10·1 answer
  • The latest form of personal communication that most resembles a public journal is a _____.
    15·2 answers
  • 25 POINTS HELP PLEASE IM TIMED
    15·1 answer
  • 1. Write a class for time objects that store three integer values for hour, minute, and second. Also, write a program to test th
    13·1 answer
  • Which of the following is NOT one of the Big 3 Google Applications that we discussed?
    9·2 answers
  • Marco had a database that showed the first, second, and third favorite ice cream flavors for each person in his school. He used
    11·2 answers
  • What is the correct html for referring to an external style sheet?
    11·1 answer
  • Select the software which is used to convert audio data to text .
    15·1 answer
  • HELP PLZZ WILL MARK BRAINLIEST
    9·1 answer
  • Direction: Write True on the line if the statement is correct. Write False if the statement is incorrect. 1. All objects are com
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!