aviral shastri
MModular
•Created by aviral shastri on 9/11/2023 in #questions
how to use modulus in mojo
i checked and now it works thanks
4 replies
MModular
•Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
yes but it will be third party for mojo like first install it in pythno then python will check then mojo will check and use
57 replies
MModular
•Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
can i use external pip installed modules in mojo
57 replies
MModular
•Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
but this is not adding numbers its just adding it as a string
57 replies
MModular
•Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
its giving me suggestion to report bug on github
57 replies
MModular
•Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
i got something
57 replies
MModular
•Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
test.mojo:6:31: error: cannot implicitly convert 'PythonObject' value to 'Int' in 'let' initializer
let add: Int= user_input1 + user_input2
~~^~~
mojo: error: failed to parse the provided Mojo
57 replies
MModular
•Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
from python import Python
fn main() raises:
let user_input1= Python.evaluate("input('Num 1')").to_int()
let user_input2= Python.evaluate("input('Num 2')").to_int()
let add: Int= user_input1 + user_input2
print(add)
57 replies
MModular
•Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
or i have to directly use python eval
57 replies
MModular
•Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
how can i get integer input
57 replies