Related Posts

This Post Has 10 Comments

  1. The answers are as follows:


    Step-by-step explanation:

    Let us look at the statements one by one

    1. The additive inverse of 10 is -10.

    The additive inverse of a number is the opposite of a number with respect to sign.

    The sum of a number and its additive inverse is zero.

    [tex]10+(-10) = 10-10 = 0[/tex]

    This statement is true.

    2. Zero is a positive number.

    Zero is neither a positive number nor a negative number. It is only used as reference to decide whether a number is positive or negative.

    This statement is false.

    3. To divide two unlike signs, the quotient is always positive.

    When two unlike signs are divided, the answer will be negative as division involves multiplication, and multiplication of two numbers with unlike signs will always be negative.

    This statement is false.

    4. Commutative Property states that:

    a + (b + c ) = (a + b ) + c

    Commutative property deals with two numbers or variables only. The property with three numbers or varibales is associative property. Hence,

    This statement is false.

    5. One is the identity element of for addition.

    Additive identity is a number that when added to a number x, the result will always be x. Zero is additive identity.


    This statement is false.

    The answers are as follows:


  2. See explaination


    This function reverses the position

    of the consonants keeping the

    position of vowel constant.


    data : type(str)

    The string on which operation

    needs to be performed

    start : type(int)

    Starting index of the string

    end : type(int)

    Ending index of the string


    def consonantReverse(data, start = 0, end = None):

    # By default user will psas the data only.

    # End will be none which will be set to length of string - 1

    if(end == None):

    return consonantReverse(data, 0, len(data)-1)

    # return as this is invalid

    if(start >= end):

    return data

    # split the data into list

    if type(data)== str:

    data = list(data)

    # initialize index1 and index2

    index1 = len(data)

    index2 = -1

    # find out the first index from beggining

    # where consonant is present

    for i in range(start, end+1):

    if(data[i] not in ['a','e','i','o','u','A','E','I','O','U']):

    index1 = i


    # find out the index from the end

    # where consonant is present

    for i in range(end, start-1, -1):

    if(data[i] not in ['a','e','i','o','u','A','E','I','O','U']):

    index2 = i


    # return as this is not valid case

    if(index1 >= index2):

    return ''.join(data)

    # swap the data in the two index

    data[index1], data[index2] = data[index2], data[index1]

    # call the function recursively

    data = consonantReverse(data, index1+1, index2-1)

    # if it is a list, join the list into string

    if(type(data) == list):

    return ''.join(data)

    # otherwise return the data


    return data

  3. 6. W=28 because you need to subtract what you have. So 47-19 and that equals 28. And to check to make sure it is right you can add 28+19=47

Leave a Reply

Your email address will not be published. Required fields are marked *