A little more code docs updating.
This commit is contained in:
parent
07ecd3d237
commit
0dcb52765f
|
@ -121,6 +121,14 @@ If it uses dot notation like `.lower()`, it works exclusively on strings.
|
|||
|
||||
`"Ten times a cow is equal to " + result + " with 10 times as many breeding opportunities."`
|
||||
|
||||
or
|
||||
|
||||
`print(var, var2, var3)`
|
||||
|
||||
or
|
||||
|
||||
`string1 += string2`
|
||||
|
||||
## String Formatting with %
|
||||
|
||||
`"%s %s - 2020" % (month, day) # Replace %s with a variable. First the month, then the day.`
|
||||
|
@ -163,6 +171,8 @@ total_cost = cucumbers * price_per_cucumber
|
|||
print(total_cost)
|
||||
```
|
||||
|
||||
`total_price += nice_sweater`
|
||||
|
||||
Cool concept from Ch2 Ex15:
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue