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
Write a function named initialMatch that takes a string parameter, text, that contains only lowercase letters and whitespace. Th
Furkat [3]

Answer:

Implementing on Python for the question, the following is the code.

Explanation:

def intialMatch(l):

   word_dict={}

   for word in l.split():

       if word_dict.get(word)==None:

           word_dict[word]=[]

       for key in word_dict.keys():

           if key[0]==word[0] and (word is not key) :

               values = word_dict.get(key)

               if word not in values:

                   values.append(word)

       for key,values in word_dict.items():

           for value in values:

               if value==key:values.remove(value)

   return word_dict

t='do what you can with what you have'

print(intialMatch(t))

6 0
3 years ago
The variable sentence stores a string. Write code to determine how many words in sentence start and end with the same letter, in
irina [24]

Answer:

sentence = "hello wow a stores good"

same_letter_count = 0

sentence_list = sentence.split()

for s in sentence_list:

   if s[0] == s[-1]:

       same_letter_count += 1

print(same_letter_count)

Explanation:

*The code is in Python.

Initialize the sentence with a string

Initialize the same_letter_count as 0

Split the sentence using split method and set it to the sentence_list

Create a for loop that iterates through the sentence_list. If the first and last of the letters of a string are same, increment the same_letter_count by 1

When the loop is done, print the same_letter_count

4 0
3 years ago
The int function can convert floating-point values to integers, and it performs rounding up/down as needed.
omeli [17]

Answer:

Thks is true the int function changes a float value to an integer and will round up or down by default.

5 0
2 years ago
A manufacturing company has several one-off legacy information systems that cannot be migrated to a newer OS due to software com
Digiron [165]

The resiliency technique which would provide the aforementioned capabilities is: D. Full backups.

An operating system (OS) can be defined as a system software which is pre-installed on a computing device, so as to manage or control software application, computer hardware and user processes.

In this scenario, a manufacturing company cannot migrate its several one-off legacy information systems (IS) to a newer operating system (OS), due to software compatibility issues.

Resiliency can be defined as a measure of the ability of a network, server, storage system, computing system or data center, to recover quickly and continue operating when it experience adverse conditions such as:

  • Power failure.
  • Equipment failure.
  • Data loss.

In Computers and Technology, there are four (4) main resiliency technique and these include:

I. Redundancy.

II. RAID 1+5.

III. Virtual machines.

IV. Full backups.

Full backup is a resiliency technique which create backups of the systems for recovery and it allows operating system (OS) patches to be installed on computer systems.

Read more: brainly.com/question/17586013

3 0
2 years ago
Develop an sec (single error correction) code for a 16-bit data word. generate the code for the data word 0101000000111001. show
Kipish [7]

Answer:

code = 010100000001101000101

Explanation:

Steps:

The inequality yields 2^{k} - 1 > = M+K, where M = 16. Therefore,

The second step will be to arrange the data bits and check the bits. This will be as follows:

Bit position              number              Check bits            Data Bits

21                                   10101

20                                  10100

The bits are checked up to bit position 1

Thus, the code is 010100000001101000101

3 0
3 years ago
Read 2 more answers
Other questions:
  • to prevent long page load time for pages containing images. It is best to use a compress file formatlike jpeg as well as appropr
    6·2 answers
  • Learning about public speaking can help improve your ________________.
    15·1 answer
  • This is question 2.5 Computer Science and I don't understand what is wrong<br><br>​
    15·1 answer
  • A company has its branches spread over five places in a state. It has become difficult for employees to transfer information and
    7·1 answer
  • In the Dynamic Partitioning technique of memory management, the placement algorithm that scans memory from the location of the l
    11·1 answer
  • Who distributes IP Address?
    10·1 answer
  • What are some ways to find out what skills you need to develop at work? Check all of the boxes that apply.
    15·2 answers
  • Your dad just gave you his old computer running Windows 7. You want to see how many volumes are contained within it. Which tool
    10·1 answer
  • Each of these is a step in cEach of these is a step in conflict resolution: Evaluate solutions suggested. Define the problem. De
    7·1 answer
  • How to transfer polygon from eth to polygon in ledger live
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!