File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 52
52
53
53
if position != last_position :
54
54
last_position = position
55
- display .print (" {}" .format (position ))
56
- print ("Position: {}" .format (position ))
55
+ display .print (f" { position } " )
56
+ print (f"Position: { position } " )
57
+
57
58
for b in range (5 ):
58
59
if not buttons [b ].value and button_states [b ] is False :
59
60
button_states [b ] = True
60
61
display .print (seven_segment_names [b ])
61
- print ("{ } button pressed". format ( button_names [ b ]) )
62
+ print (f" { button_names [ b ] } button pressed" )
62
63
63
64
if buttons [b ].value and button_states [b ] is True :
64
65
button_states [b ] = False
65
66
display .print (" " )
66
- print ("{ } button released". format ( button_names [ b ]) )
67
+ print (f" { button_names [ b ] } button released" )
Original file line number Diff line number Diff line change 49
49
50
50
if position != last_position :
51
51
last_position = position
52
- print ("Position: {}" . format ( position ) )
52
+ print (f "Position: { position } " )
53
53
54
54
for b in range (5 ):
55
55
if not buttons [b ].value and button_states [b ] is False :
56
56
button_states [b ] = True
57
- print ("{ } button pressed". format ( button_names [ b ]) )
57
+ print (f" { button_names [ b ] } button pressed" )
58
58
59
59
if buttons [b ].value and button_states [b ] is True :
60
60
button_states [b ] = False
61
- print ("{ } button released". format ( button_names [ b ]) )
61
+ print (f" { button_names [ b ] } button released" )
You can’t perform that action at this time.
0 commit comments