1 2 3 4 5 6 7 8 9 10 11 12 |
def summation(n): total = 0 for count in range ( 1 ,n + 1 ): total + = count return total def main(): n = int ( input ( 'Enter the number of terms : ' )) total = summation(n) print ( 'Sum of first' , n, 'positive integers: ' ,total) if__name__ = = '__main__' : main() |
THE ERROR MESSAGE IS
Error:Error(s), warning(s):
File "source_file.py", line 11
if__name__=='__main__':
^
SyntaxError: invalid syntax