0

Need help on this. I’m a beginner and I don’t know how to do this.

I’m trying to make a prototype AI based on what I know on Python (which is next to nothing, if I’m being honest) and I have no idea how to print a string based on a specific user input.

1st Sep 2025, 3:21 AM
E John
E John - avatar
5 Respostas
+ 3
Then you should first get started with the basics at: https://www.sololearn.com/learn/courses/JUMP_LINK__&&__python__&&__JUMP_LINK-introduction Then move to intermediate, then to developer. Making a real AI is hard but after learning basics - you can make some simple chatbots with using dictionaries or if-else trees
1st Sep 2025, 3:27 AM
Unknown Decoder
Unknown Decoder - avatar
+ 1
Hi! you probably meant something like that? user_input = input() # this input will be saved as a data type - string print(user_input)
1st Sep 2025, 3:33 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Are you referring to f-string? Or a more complex like AI chatbot: when a user type something, it will output a response based on user input? I believe you need API for this.
1st Sep 2025, 6:26 AM
Pat
0
Not really. I wasn’t clear, I guess. I meant more along the lines of if a specifc input() command was entered, it would print a specific line of code.
1st Sep 2025, 3:38 AM
E John
E John - avatar
0
Neural intents? The most common thing I can think But I guess you are mentioning something like: If asked this -> print this Then I guess the prototype you are referring to is rule-based AI It's quite simple if you used if-else but smart people will use dictionary like structure to perform the task Let's say: Hello -> Hey there Or Hi -> Hey there Sometimes it can also result 'Hi dude', 'Hello user', etc... something like that So what you can do is create a dictionary with a tuple as ID and values as list Where ID has those string which can be the possible input or maybe the part of input in the string and at the end we can access any random string from the list which is the value of that particular input style. If you meant this then it's a rule-based AI which was used before Neural intents and the current AI It's limitations are like using programming languages i.e. you cannot use normal human language or rephrase any specific sentence cause it's not able to understand the language itself.
1st Sep 2025, 8:44 AM
Snehil Pandey
Snehil Pandey - avatar