Question: Python 2.7 Write a program that accepts a positive integer N as a command line argument and prints out the sum of the squares of

Python 2.7

Write a program that accepts a positive integer N as a command line argument and prints out the sum of the squares of all even numbers less than or equal to N (i.e., 2^2 + 4^2 + 6^2 + up to the specified limit). You may assume that N>=1, but you cannot assume that N is even.

Example1: input: 0, output: 0

Example2: input: 1, output: 0

Example3: input: 2, output: 4

Example4: input: 3, output: 4

Example5: input: 4, output: 20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!