Skip to content

[tutorial] random inputs example does not allow floats #10

@anthonygego

Description

@anthonygego

The run script fails in the user pass a float as input. int() actually does not allow any string which is not an integer.

student = int(get_input("student_code"))
solution = int(math.sqrt(value/2))

This should be replaced by float() or rely on exception handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions