From be94b55b835283de53c686343164641e15abe806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Mon, 14 Dec 2015 12:44:58 +0100 Subject: Zadnje spremembe pred zagovorom. --- robot/problems/introduction/countlines/common.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'robot/problems/introduction/countlines/common.py') diff --git a/robot/problems/introduction/countlines/common.py b/robot/problems/introduction/countlines/common.py index 5b8db2e..6a50988 100644 --- a/robot/problems/introduction/countlines/common.py +++ b/robot/problems/introduction/countlines/common.py @@ -11,8 +11,7 @@ visible = True solution = '''\ import time -from ev3dev import * -from mindstorms_widgets import mindstorms_widgets +from mindstorms_widgets import * color_table = ['none', 'black', 'blue', 'green', 'yellow', 'red', 'white', 'brown'] -- cgit v1.2.1 From b4e46b75f5e2a890b41d2e20a89767590e54ccb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Tue, 15 Dec 2015 10:34:40 +0100 Subject: Dodani plani za robotske probleme. --- robot/problems/introduction/countlines/common.py | 1 + 1 file changed, 1 insertion(+) (limited to 'robot/problems/introduction/countlines/common.py') diff --git a/robot/problems/introduction/countlines/common.py b/robot/problems/introduction/countlines/common.py index 6a50988..925fc06 100644 --- a/robot/problems/introduction/countlines/common.py +++ b/robot/problems/introduction/countlines/common.py @@ -31,6 +31,7 @@ while time.time()-start < 2.1: stevec += 1 color = c robot.move_steering( 'off' ) + print( "Stevilo crt:", stevec ) ''' -- cgit v1.2.1 From 0883cb2a6b0bac23bd7553618f4e8db7c882a757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Tue, 15 Dec 2015 13:13:49 +0100 Subject: Popravki programov pred zagovorom projekta. --- robot/problems/introduction/countlines/common.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'robot/problems/introduction/countlines/common.py') diff --git a/robot/problems/introduction/countlines/common.py b/robot/problems/introduction/countlines/common.py index 925fc06..6d2bf13 100644 --- a/robot/problems/introduction/countlines/common.py +++ b/robot/problems/introduction/countlines/common.py @@ -11,7 +11,6 @@ visible = True solution = '''\ import time -from mindstorms_widgets import * color_table = ['none', 'black', 'blue', 'green', 'yellow', 'red', 'white', 'brown'] @@ -24,7 +23,7 @@ robot.move_steering( 'on' ) start = time.time() stevec = 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: -- cgit v1.2.1 From f80206e6a4e4cec1574a375cb04dbdf07d3e02cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Wed, 23 Dec 2015 11:28:05 +0100 Subject: angleska verzija --- robot/problems/introduction/countlines/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'robot/problems/introduction/countlines/common.py') diff --git a/robot/problems/introduction/countlines/common.py b/robot/problems/introduction/countlines/common.py index 6d2bf13..bf5343b 100644 --- a/robot/problems/introduction/countlines/common.py +++ b/robot/problems/introduction/countlines/common.py @@ -21,17 +21,17 @@ robot.connect_sensor( 'color' ) robot.move_steering( 'on' ) start = time.time() -stevec = 0 +counter = 0 color = -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 = { -- cgit v1.2.1