# Help with python print operations/messages?

so I have the following algorithm I have created to calculate the sum of squares of n:
n=6
count=1
total=0
while count<=n:
total=total+count*count
count=count+1
I am wondering how to make my algorithm print the following:
"The sum of squares from 1 to 6 = 91"
But I would obviously want it...
show more
so I have the following algorithm I have created to calculate the sum of squares of n:

n=6

count=1

total=0

while count<=n:

total=total+count*count

count=count+1

I am wondering how to make my algorithm print the following:

"The sum of squares from 1 to 6 = 91"

But I would obviously want it to print the right statement depending on the input number, n. Can someone explain how to code this?

n=6

count=1

total=0

while count<=n:

total=total+count*count

count=count+1

I am wondering how to make my algorithm print the following:

"The sum of squares from 1 to 6 = 91"

But I would obviously want it to print the right statement depending on the input number, n. Can someone explain how to code this?

Update:
**IN PYTHON 2 PLEASE

Follow

3 answers
3

Are you sure you want to delete this answer?