File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -219,8 +219,8 @@ Expected output: `6`
219219
220220``` python
221221let x = 2
222- let y = 3
223- print (x + y )
222+ let z = 3
223+ print (x + z )
224224
225225let total = 0
226226for idx in range (4 ):
Original file line number Diff line number Diff line change @@ -186,6 +186,8 @@ def print_banner(text):
186186 print (text.center(40 ))
187187 print (" =" * 40 )
188188 # implicit return None
189+
190+ print_banner(" Hello" )
189191```
190192
191193---
@@ -477,9 +479,9 @@ print(temp.fahrenheit) # 32.0
477479
478480``` python
479481class Vector :
480- def __init__ (self , x , y ):
482+ def __init__ (self , x , y_val ):
481483 self .x = x
482- self .y = y
484+ self .y = y_val
483485
484486 def __add__ (self , other ):
485487 return Vector(self .x + other.x, self .y + other.y)
Original file line number Diff line number Diff line change @@ -356,6 +356,8 @@ def f(
356356def greet (name , greeting = " Hello" , times = 1 ):
357357 for _ in range (times):
358358 print (f " { greeting} , { name} " )
359+
360+ greet(" World" )
359361```
360362
361363### Type Annotations
Original file line number Diff line number Diff line change @@ -201,7 +201,9 @@ Multilingual programs can use any supported numeral literal directly:
201201# English program with Devanagari numeral
202202let count = ४२ # equivalent to 42
203203print (count + 8 ) # 50
204+ ```
204205
206+ ``` python
205207# French program with Arabic-Indic numeral
206208soit total = ٣٠ + ١٢
207209afficher(total) # 42
You can’t perform that action at this time.
0 commit comments