MATH IT-140
Codio Project File Edit Find View Tools Education Help Configure. Project Index (static) Configure. squared. Squared X WNH # Get N from the command...
View the step-by-step solution to:

Question

# I need help writing this code

Codio
Project
File
Edit
Find
View
Tools
Education
Help
Configure.
Project Index (static)
Configure..
squared.py
6. 3. Squared
X
WNH
# Get N from the command line
import sys
Collapse
Challenges
N = int(sys. argv[1])
# Your code goes here
number = N
6. 3. Squared
for number in range (0, N, +1) :
number = number * number
print (number)
10
total = str (number)
We will provide you with a value N. You
should calculate the sum of each value of
N squared from 0 up to and including N.
In mathematical notation, this is written as
So if we passed in 3, you would output
02 + 12 + 22 + 32 = 14
Check It!
X
LAST RUN on 9/23/2019.
12:10:37 PM
Program Output
Program Failed for Input:
2
Expected Output: 5
Your Program Output: 0
1
Your output was
incorrect. Try again.

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents
• ### -

Question & Answers

Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

Ask a Question
Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes