Hai there,
I am a robotic student and very new in python programming. Here, I have a project to classify the type of robot. For example, a customer would like to buy a robot arm for their company. So, this project will aid them to select robot of their choices. First there will be a question such as " Hi sir, welcome to XXX Robot Factory""please choose the robot type for their specification" "a)arc welding b)grinding c)welding and d)laser cutting. Then, the customer will enter one key like (a) and the specification for the robot such as its price,load capacity and life will come out to show to the customer.Only these are my project and I have to use rule-base system [if..else statement] to meets its criteria. Can help me with this??

Recommended Answers

All 2 Replies

I am a robotic student and very new in python programming. Here, I have a project to classify the type of robot. For example, a customer would like to buy a robot arm for their company. So, this project will aid them to select robot of their choices. First there will be a question such as " Hi sir, welcome to XXX Robot Factory""please choose the robot type for their specification" "a)arc welding b)grinding c)welding and d)laser cutting. Then, the customer will enter one key like (a) and the specification for the robot such as its price,load capacity and life will come out to show to the customer.Only these are my project and I have to use rule-base system [if..else statement] to meets its criteria. Can help me with this??

Python lends itself to just 'jumping in' and to start coding:

# print greeting ...
greeting = "Hi sir, welcome to XXX Robot Factory"
print( greeting )

# now do a main loop where you show menu
# get choice ... and then 'process' choice

menu = "a) arc welding\n" \
       "b) grinding   \n" \
       "c) welding    \n" \
       "d) laser cutting\n" \
       "x) exit this loop\n"

def doProcessA(): # dummies for now
    print( 'A' )

def doProcessB():
    print( 'B' )

while( True ): # start main loop
    print( menu )
    choice = input( "Your choice: " )
    if choice == "a":
        doProcessA()
    elif choice == "b":
        doProcessB() 

    # Note:these process functions
    # are to be yet 
    # 'defined' (by you) above
    # like this:
    # def doProcessA():
        # ....
        #...
        # and MAY return values
        #     if need to
        # x = y = z = 0 # 'dummy' line for now
        # return x, y, z


    # etc ...


    # etc ...

    elif choice == "x":
        break;


    # ....
    else:
        print( "That choice is NOT valid here." )

This may get you started

Really appreciates it. really help me a lot..thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.