File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,15 @@ print(z)
64
64
65
65
The Python print statement is often used to output variables.
66
66
67
- To combine both text and a variable, Python uses the + character:
67
+ * To combine both text and a variable, Python uses the + character:
68
68
69
69
Example
70
70
```
71
71
x = "A"
72
72
print("Python is " + x)
73
73
```
74
74
75
- You can also use the + character to add a variable to another variable:
75
+ * You can also use the + character to add a variable to another variable:
76
76
77
77
```
78
78
x = "life is "
@@ -81,13 +81,13 @@ z = x + y
81
81
print(z)
82
82
```
83
83
84
- For numbers, the + character works as a mathematical operator:
84
+ * For numbers, the + character works as a mathematical operator:
85
85
```
86
86
x = 78
87
87
y = 98
88
88
print(x + y)
89
89
```
90
- If you try to combine a string and a number, Python will give you an error:
90
+ * If you try to combine a string and a number, Python will give you an error:
91
91
92
92
```
93
93
x = 20
You can’t perform that action at this time.
0 commit comments