예제 #1
0
 def answer(self, text):
     if Answers.isPositive(text):
         print("What game would you like to search?")
         return SearchState()
     elif not Answers.isPositive(text):
         return None
     else:
         print(
             "Sorry, I didn't understand what you meant, can you be more specific?"
         )
         return StartAgainState()
예제 #2
0
def Decision(if_Answer):
    global answer
    answer = input(colored("\n What are you going to do? ", "yellow"))

    # Calling the right if statement relevant to the question
    if if_Answer == 1:
        Answers.Answer1()
    elif if_Answer == 2:
        Answers.Answer2()
    elif if_Answer == 3:  #TEST
        Answers.Answer3()
예제 #3
0
 def answer(self, text):
     if Answers.isPositive(text):
         print(" What game do you want??")
         return SearchState()
     elif not Answers.isPositive(text):
         print("What's your name?")
         return UserNameState()
     else:
         print(
             "Sorry, I didn't understand what you meant, can you be more specific?"
         )
         return ConfirmGameState()
예제 #4
0
 def answer(self, text):
     if Answers.isPositive(text):
         print("Your order is complete. You can download your games now.")
         print("Do you want to start another order?")
         return StartAgainState()
     elif Answers.isPositive(text) == False:
         print("Do you want to start another order?")
         return StartAgainState()
     else:
         print(
             "Sorry, I didn't understand what you meant, can you be more specific?"
         )
         return ConfirmCreditCardState()
예제 #5
0
 def answer(self, text):
     if Answers.isPositive(text):
         order.games.append(order.game)
         order.total += order.game["price"]
         print("Do you want to add another game?")
         return AddAnotherGameState()
     elif not Answers.isPositive(text):
         print("What's the name of the game?")
         return GameNameState()
     else:
         print(
             "Sorry, I didn't understand what you meant, can you be more specific?"
         )
         return ConfirmGameState()
예제 #6
0
def main():
    """
	主函数

	"""
    Info = Read_In.Read_In()
    Currency = Translate_To_Roman_Numerals.Translate_To_Roman_Numerals(Info)
    Price = Per_Price.Per_Price(Info, Currency)
    Answers.Answers(Info, Currency, Price)
예제 #7
0
    def __init__(self):

        super(QMainWindow, self).__init__()

        # Настройки интерфейса программы
        self.setFont(QFont('Century Gothic', 15))
        self.setWindowTitle("Книга бизнес-процессов")
        self.setWindowIcon(QIcon('logo.png'))
        self.windowW = Parameters.ParameterSize().ww()
        self.windowH = Parameters.ParameterSize().wh()
        self.setFixedSize(self.windowW * 0.6770833333333333,
                          self.windowH * 0.8333333333333333)

        # Вкладки
        ans = Answers.FormWidget(self)
        shablon = Shablon.FormWidget1(self)
        best_offer = BestOffer.FormWidget2(self)
        statistics = Statistics.FormWidget3(self)
        tab = QTabWidget()
        tab.addTab(ans, "Ответы")
        tab.addTab(shablon, "Шаблоны")
        tab.addTab(best_offer, "Наилучшее предложение")
        tab.addTab(statistics, "Статистика")

        main_widget = QWidget()
        vbox = QHBoxLayout()
        vbox.addWidget(tab)
        main_widget.setLayout(vbox)
        self.setCentralWidget(main_widget)

        # Меню программы
        menubar = self.menuBar()

        setting_action = QAction(QIcon('setting.png'), '&Настройки', self)
        setting_action.setStatusTip('Открыть настройки')
        setting_action.triggered.connect(self.show_setting)
        setting_action.setShortcut('Ctrl+N')

        info_action = QAction(QIcon('info.png'), '&Информация', self)
        info_action.setStatusTip('Информация о программе')
        info_action.triggered.connect(self.show_info)
        info_action.setShortcut('Ctrl+I')

        exit_action = QAction(QIcon('quit.png'), '&Выход', self)
        exit_action.setShortcut('Ctrl+Q')
        exit_action.setStatusTip('Выход из программы')
        exit_action.triggered.connect(qApp.quit)

        program_menu = menubar.addMenu('&Программа')
        program_menu.addAction(setting_action)
        program_menu.addAction(info_action)
        program_menu.addAction(exit_action)
예제 #8
0
 def answer(self, text):
     choose = Answers.isPositive(text)
     if choose:
         print("What game would you like to search?")
         return SearchState()
     elif choose == False:
         print("What's the name of the game?")
         return GameNameState()
     else:
         print(
             "Sorry, I didn't understand what you meant, can you be more specific?"
         )
         return SearchAgainState()
예제 #9
0
 def answer(self, text):
     choose = Answers.isCreditCard(text)
     if choose:
         print("You choose Credit Card. How many installments?")
         return PaymentInstallmentsState()
     elif not choose:
         print(
             "You choose Bank Ticket. You will be able to download your game after the payment confirmation."
         )
         print(
             "Download your ticket, pay it and them you will receive and email with the download link."
         )
         print("Bank Ticket")
         print("Do you want to buy another game?")
         return StartAgainState()
     else:
         print(
             "Sorry, I didn't understand what you meant, can you be more specific?"
         )
         print("How do you want to pay? Credit card or bank ticket?")
         return PaymentMethodState
예제 #10
0
 def start_command_execute(command):
     command.bot.send_message(command.message.from_user.id, Answers.start_command_answer())
예제 #11
0
            if('info' not in jso): 
                print("A")
            dataType = jso['info']
            fig = None
            if(dataType ==  'Sound'):
                soundArray = np.array(jso['data'])
                fig = SoundLoudness.DrawSoundLoudness(soundArray, 0.05)

            elif (dataType ==  'Vokaturi'):
                vokaturiArr = np.array(jso['data'])
                fig = Emotions.DrawEmotions(vokaturiArr)     

            elif (dataType == 'LeftHand' or dataType == 'RightHand'):
                dataArray = np.array(jso['data'])
                fig = HandAnalytics.DrawHandAnalytics(dataArray, 1)

            elif (dataType == 'Gazes'):
                dataArray = np.array(jso['data'])
                fig = GazeAnalytics.DrawGazeAnalytics(dataArray,1)

            elif(dataType == 'Answers'):
                dataArray = np.array(jso['data'])
                fig = Answers.DrawAnswerAnalytics(dataArray)

            if(fig is not None):
                fig.suptitle(fileN)
                fig.savefig('./Images/'+fileN+ '_chart')
                plt.close(fig)


예제 #12
0
 def answer(self, text):
     order.searchList = Answers.printSearch(text, Answers.corpus)
     print("Do you want to search again? ")
     return SearchAgainState()
예제 #13
0
def resposta(pergunta):
    import Answers
    app = Answers()