Python3 my struggle


Started the Python3 and went to pro after completing the first part. It got hella hard. I feel like the += thing was just kinda glossed over and the next exercise is all about it. I tried customer_one_total += customer_one_itemization += sales_tax. Made a great big syntax error all over the floor. I feel like ive been bait and switched.


I think you have one = sign too many. Try:

customer_one_total += customer_one_itemization + sales_tax

Good luck!


Search for python assignment operators to get the complete picture. Most basic arithmetic operations can be written in this way to save typing and repetition.

a = a + 5


a += 5

When ever we increase a value by some amount, we are said to augment that value. Multiplication, addition and exponentiation (exponents greater than 1) all increase the value upon which they are applied.

a = 7
a *= 6
print (a)    # 42

a **= 2
print (a)    # 49

Each of the above can be called augmentation operators but the key is to see that two operations are being carried out, not one. First the math is done, then the assignment back onto the variable.

As with this particular expression,

customer_one_total += customer_one_itemization + sales_tax

note that any expression that can be assigned, can also be used in this operation.

a = a + 3 * (b + c + d)  =>  a += 3 * (b + c + d)


also can my username not be my name?


Your username is set when you join CC and it stays the same over here. Your real name is visible by clicking on your alias in any post.


Eh i guess thats fine.