none
im stuck! RRS feed

  • Question

  • I'm making a siri program but I'm stuck trying to get it to answer for bad and good for example:

    "hello how are you doing"

    good = "Oh good"

    bad = "Oh that's to bad"

    when I type in "good" then it says "Oh good"

    but when I type in "bad" it still says "Oh good". how do I fix it?

    this is the program:

    TextWindow.Write("Enter your Name: ")
    name = TextWindow.Read()
    TextWindow.Write("hello " + name + ". ")
    Textwindow.WriteLine("how are you doing " + name + "?")
    TextWindow.Write("Enter Reply: ")
    Good = TextWindow.Read()
    Textwindow.WriteLine("oh good " + "!")
    bad = TextWindow.Read()
    TextWindow.WriteLine("thats to bad " + ".")





    • Edited by seek729 Monday, April 7, 2014 4:57 PM
    Monday, April 7, 2014 4:51 PM

Answers

  • You have to replace the last 3 lines by:

    If good="good" then

    TextWindow.WrileLine("Oh good "+"!")

    else

    TextWindow.WriteLine("thats to bad " + ".")

    endif


    Jan [ WhTurner ] The Netherlands

    • Marked as answer by seek729 Tuesday, April 8, 2014 4:35 PM
    Monday, April 7, 2014 5:11 PM
    Answerer

All replies

  • You have to replace the last 3 lines by:

    If good="good" then

    TextWindow.WrileLine("Oh good "+"!")

    else

    TextWindow.WriteLine("thats to bad " + ".")

    endif


    Jan [ WhTurner ] The Netherlands

    • Marked as answer by seek729 Tuesday, April 8, 2014 4:35 PM
    Monday, April 7, 2014 5:11 PM
    Answerer
  • You need to use  "If" Commands. I think you should reread the beginners PDF tutorial
    Wednesday, April 9, 2014 12:15 AM