You are given a function f(x)=x^2. You are also given k lists. The ith list consists of ni elements.
You have to pick one element from each list so that the value from the equation below is maximized:
s-fx1+fx2................fxk %m
% denotes the element picked from the list . Find the maximized value obtained.
denotes the modulo operator.
Note that you need to take exactly one element from each list, not necessarily the largest element. You add the squares of the chosen elements and perform the modulo operation. The maximum value that you can obtain, will be the answer to the problem.
Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given scores. Store them in a list and find the score of the runner-up.
Input Format
The first line contains n . The second line contains an array a[] of n integers each separated by a spaceFind out the mean, median and standard deviation of this numpy array -> np.array([1,5,3,100,4,48])
To fetch a row from dataframe given index x, we can use loc.
Df.loc[10] where 10 is the value of the index.
Code
get me the code
Assume a text file “Test.txt” is already created. Using this file, write a function to create three
files “LOWER.TXT” which contains all the lowercase vowels and “UPPER.TXT” which contains all
the uppercase vowels and “DIGIT.TXT” which contains all digits
Write a program in Python allowing to delete multiple spaces in a text file
named myfile.txt which contains a text: T =
'Python is programming language'
# Function: Display the Bitcoin price in the menu item – to assist the user when setting price levels
def updateMenuPrice(self):
# Get the latest Bitcoin info (as a Tick object) from getBitMexPrice(). Name it tickObj.
tickObj = self.getBitMexPrice()
# Update the currentPrice property with the Bitcoin price in tickObj.
Input
The integer I gave
Description
N/A
Constraints
N/A
Sample
N/A
Output
The first line will contain a message prompt to input the integer.
The second line contains the word "yes" or "no".
Enter·the·integer:·76
no