Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing The Format Of If-Else Loops To Make It More Convenient #14

Open
Arnav-Singh-Legendary opened this issue Apr 28, 2022 · 0 comments

Comments

@Arnav-Singh-Legendary
Copy link

Arnav-Singh-Legendary commented Apr 28, 2022

We Can Apply This Kind (Given Below) Of Format Instead Of If-Else Loops as these are more convenient for creating conversations and I am Planning To Add A GUI Like Cortana.

It Would Be My Honor To Contribute, Please Allow Me To Contribute!

Regards
Arnav Singh

            for text in Greetings1_In:
                if str(text) in Query:
                    Random_Number = Rnum(0, len(Greetings1_Out)) #Rnum Is A Function for getting A random number!
                    Speak(Greetings1_Out[Random_Number])   
                    break

            for text in Greetings2_In:
                if str(text) in Query:
                    Random_Number = Rnum(0, len(Greetings2_Out))
                    Speak(Greetings2_Out[Random_Number])   
                    break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant