User input/Text: Difference between revisions
Content added Content deleted
m (Link to related task) |
(Added R code) |
||
Line 446: | Line 446: | ||
<lang python> number = float(input("Input a number: "))</lang> |
<lang python> number = float(input("Input a number: "))</lang> |
||
float may be replaced by any numeric type, such as int, complex, or decimal.Decimal. Each one varies in expected input. |
float may be replaced by any numeric type, such as int, complex, or decimal.Decimal. Each one varies in expected input. |
||
=={{header|R}}== |
|||
{{works with|R|2.81}} |
|||
<lang R> |
|||
stringval <- readline("String: ") |
|||
intval <- as.integer(readline("Integer: ")) |
|||
</lang> |
|||
=={{header|Raven}}== |
=={{header|Raven}}== |