This is a programming exercise. You must write a Python script that solves Project Euler Problem #6. If you do not want to sign up for Project Euler, you may ask the instructor for the correct answer. ## RequirementsProject Euler Problem #6 reads as follows:
Create a Python script named ## BackgroundNatural numbers refer to all of the positive integers. For example, the first 10 natural numbers are: `1 2 3 4 5 6 7 8 9 10` To take the square of a number (i.e. take a number to the power 2), you need to use the `3 ** 2` You can also calculate this using the built-in `pow(3, 2)` ## ExampleThe sum of the squares of the first 10 natural numbers is: The square of the sum of the first 10 natural numbers is:
Hence the difference between the sum of the squares of the first 10 natural numbers and the square of the sum is:
Double check your program using the answer provided above, then solve for the first 100 natural numbers. ## HintsThere are multiple ways to solve this problem. My solution uses variables, the ## SubmissionWhen complete, show your script to the instructor for credit. If you do not finish by the end of the class, you may email the script to the instructor. Please include the following subject line for your email:
Make sure you include your full name in the email body. |

Assignments > Lab Assignments > Day 1 – Python Programming, Part 1 > Unit B – Conditionals and Iteration >