ModularM
Modular14mo ago
4 replies
staycia930

Using the input function will cause Mojo to crash.

Using the input function in the main function causes mojo to crash.
Please tell me why it crashes and how to work around it.
fn main():'''
    name = input("Enter your name: ”)
    print(“Hello”, name)


This is the mojoproject.toml
[project].
authors = [“Staycia”].
channels = [“conda-forge”, “https://conda.modular.com/max”]
description = “Add a short description here”
name = “c2024Exam”
platforms = [“osx-arm64”].
version = “0.1.0”

[tasks]

[dependencies]]
max = “>=24.5.0,<25”
Was this page helpful?