Today is my day 55th of 100daysofcode and python learning. Like today I also continue to learned properties of SQL from datacamp.
Like ORDER BY, GROUP BY, HAVING, etc. Also learned more about algorithm from Coursera.
Code to calculate maximum pairwise product.
def max_pairwise_product(numbers): n = len(numbers) max_product = 0 for first in range(n): for second in range(first+1,n): max_product = max(max_product, numbers[first] * numbers[second]) return max_product input_n = int(input()) input_numbers = [int(x) for x in input().split()] print(max_pairwise_product(input_numbers))
Output of the following code is,
3 5 6 9 54
Day 55 Of #100DaysOfCode and #Python— Durga Pokharel (@mathdurga) February 21, 2021
* More Properties Of SQL
* More About Algorithm
* Greedy Algorithm
* Code To Calculate Maximum Pairwise Product#womenintech #DEVCommunity #CodeNewbies pic.twitter.com/PkImUnmSpd