Given a list of integers, write a program to identify the contiguous sub-list that has the largest sum and print the sum. Any non-empty slice of the list with step size 1 can be considered as a contiguous sub-list.
Write a program to print the anti-diagonal elements in the given matrix.
Given a list of integers, write a program to identify the contiguous sub-list that has the largest sum and print the sum. Any non-empty slice of the list with step size 1 can be considered as a contiguous sub-list.
Given a sentence S, write a program to print the frequency of each word in S. The output order should correspond with the word's input order of appearance.
Write a program to print the absolute difference between the two given numbers. (Absolute difference is the difference without the negative sign)
Write a python program that:
Note:
- Students are referred to using an ID (automatically incremented, starting from 1).
Write a program to print the absolute difference between the two given numbers. (Absolute difference is the difference without the negative sign)
Write a python program that:
Write a python statement for the following. a) Assigns the product of 10 and 15 to the variable product. b) Subtracts the variable down_payment from the variable total and assigns the result to the variable due. c) Multiplies the variable subtotal by 0.15 and assigns the result to the variable total. d) Prompts the user to enter his or her favorite color and assigns the user’s input to a variable named color. e) Assume the variable sales references a float value 56.3355. Round the value to two decimal points.
Given a positive integer, write a program to print the digit in its one's place