Sum of fourth powers of the first n natural numbers | Python3 Program to find the sum of forth powers of first n natural numbers ; Return the sum of forth power of first n natural numbers ; Driver method
import math NEW_LINE def fourthPowerSum ( n ) : NEW_LINE INDENT sum = 0 NEW_LINE for i in range ( 1 , n + 1 ) : NEW_LINE INDENT sum = sum + ( i * i * i * i ) NEW_LINE DEDENT return sum NEW_LINE DEDENT n = 6 NEW_LINE print ( fourthPowerSum ( n ) ) NEW_LINE