I need help with python | Sololearn: Learn to code for FREE!

-4

I need help with python

I have a project as homework

5/2/2021 2:10:14 AM

afrah ali

8 Answers

New Answer

+1

afrah ali Do you want to build a traffic light program?

+1

Check this out : https://code.sololearn.com/cujyft964UJe/?ref=app

+1

*The program is made only for demonstration purposes

0

I have to biuld expert system, i cant do the rules Sorry my english is not good

0

RobotCrossStreet(KnowledgeEngine): @Rule(Light(color='green')) def green_light(self): print("Walk") @Rule(Light(color='red')) def red_light(self): print("Don't walk") @Rule(AS.light << Light(color=L('yellow') | L('blinking-yellow'))) def cautious(self, light): print("Be cautious because light is", light["color"]) This is rules

0

I want to build a program like a traffic lighr Sahil

0

Sahil in your programms use While loops and "True" / "False" like red = True green = False yellow = False if red: codecode

0

Ok