input
Is it possible to create an input function like this: while true message = input(...)? in microStudio ?
Is it possible to create an input function like this: while true message = input(...)? in microStudio ?
how do you want to get input? like where
I want a code that asks the user for something and uses it as a variable. For example: while true: message = input(">")
if "hello" is in the message then print("hello, how are you?)(
I just want to know if it's possible")`
so using the console? also are you attempting to make an ai? I need to know this because I'll give you code easier for ai usage but if you aren't I'll give you code for just what you want
Yes, absolutely, I'd like to create an AI. I started with Python, but I saw that the input opened a window on my computer. Since that worked, I wondered if it might be possible to create something similar with MicroStudio?
this is my python code 'import time import random
name = None
morning = ["hello", "hi", "good morning", "hey"] print("commencer un chat")
while True: message = input("> ") message_lower = message.lower() if any(x in message_lower for x in morning): A = random.choice(morning) print(A.capitalize()) time.sleep(1)
if name is None:
print("How are you? I'm Max, and you?")
name = input("What is your name? ")
print(f"Nice to meet you, {name.capitalize()}!")
else:
print(f"Hello again, {name.capitalize()}!")
elif "quit" in message_lower or "bye" in message_lower:
print(f"Oh you leave? Bye, {name if name else 'friend'}!")
break
else:
print("Sorry, but I don't know that command/phrase.")'
oh I'm sorry I don't know python I thought you where using microscript 2.0
It doesn't matter if you know how I can create an "input" in micro studio, please let me know, thank you.