diff options
author | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-12-28 10:23:46 +0100 |
---|---|---|
committer | Martin Možina <martin.mozina@fri.uni-lj.si> | 2015-12-28 10:23:46 +0100 |
commit | 165c7165bb2184c9c9e0576a074ba4f29052bf8f (patch) | |
tree | 9b86dbbd1d4c39b52bfd7f54cfb13c2354727a53 /robot/problems/introduction/countlines/common.py | |
parent | 4cdea335b0951e3c12dfb7b906f958d6b5be25c6 (diff) | |
parent | c1bb0d56b2c0482c766d094c65fdf0fd9d1aa0ba (diff) |
Merge branch 'master' of 192.168.15.97:codeq-problems
Conflicts:
python/problems/functions/palindrome/sl.py
python/problems/functions/palindromic_numbers/sl.py
Diffstat (limited to 'robot/problems/introduction/countlines/common.py')
-rw-r--r-- | robot/problems/introduction/countlines/common.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/robot/problems/introduction/countlines/common.py b/robot/problems/introduction/countlines/common.py index 5b8db2e..bf5343b 100644 --- a/robot/problems/introduction/countlines/common.py +++ b/robot/problems/introduction/countlines/common.py @@ -11,8 +11,6 @@ visible = True solution = '''\ import time -from ev3dev import * -from mindstorms_widgets import mindstorms_widgets color_table = ['none', 'black', 'blue', 'green', 'yellow', 'red', 'white', 'brown'] @@ -23,16 +21,17 @@ robot.connect_sensor( 'color' ) robot.move_steering( 'on' ) start = time.time() -stevec = 0 +counter = 0 color = -1 -while time.time()-start < 2.1: +while time.time()-start < 1.2: c = robot.color_sensor_measure( 'color' ) # values: 0-7 see the scale above if c!=color: if c!=6 and c!=0: - stevec += 1 + counter += 1 color = c robot.move_steering( 'off' ) -print( "Stevilo crt:", stevec ) + +print( "Number of lines:", counter ) ''' hint_type = { |