1. Hello!

    First of all, welcome to MapleLegends! You are currently viewing the forums as a guest, so you can only view the first post of every topic. We highly recommend registering so you can be part of our community.

    By registering to our forums you can introduce yourself and make your first friends, talk in the shoutbox, contribute, and much more!

    This process only takes a few minutes and you can always decide to lurk even after!

    - MapleLegends Administration-
  2. Experiencing disconnecting after inserting your login info? Make sure you are on the latest MapleLegends version. The current latest version is found by clicking here.
    Descartar aviso

Need help with Python program

Tema en 'Off-Topic' iniciado por Csochapili, 15 Oct 2015.

  1. Offline

    Redwine Capt. Latanica

    Registrado:
    20 Abr 2015
    Mensajes:
    301
    Me Gusta recibidos:
    356
    Trofeos:
    278
    Ubicación:
    USA
    Local Time:
    14:26
    IGN:
    Redwine
    Level:
    157
    Guild:
    CIRCUS
    Looks like you can take it out and it still works :p
     
  2. OP
    OP
    Csochapili
    Offline

    Csochapili Slime

    Registrado:
    19 Sep 2015
    Mensajes:
    24
    Me Gusta recibidos:
    22
    Trofeos:
    1
    Género:
    Femenino
    Local Time:
    19:26
    IGN:
    Csochapili
    Job:
    Crossbowman
    Is there something to say "all integers" in python? I want my program to give an error message when someone types anything other than an integer when asked how many points would you like to play to?
     
  3. Offline

    Bulba Skelegon Retired Staff

    Registrado:
    11 Dic 2014
    Mensajes:
    1.059
    Me Gusta recibidos:
    1.035
    Trofeos:
    433
    Género:
    Masculino
    Ubicación:
    Singapore
    Local Time:
    02:26
    This might help.
     
    • Like Like x 1
  4. Offline

    Redwine Capt. Latanica

    Registrado:
    20 Abr 2015
    Mensajes:
    301
    Me Gusta recibidos:
    356
    Trofeos:
    278
    Ubicación:
    USA
    Local Time:
    14:26
    IGN:
    Redwine
    Level:
    157
    Guild:
    CIRCUS
    One of the "features" of python is that it is weakly-typed. Other languages require you to declare variable types when they are declared, and these cannot change. Python is more flexible, but that can lead to issues like this.
     
  5. Offline

    Ghost. Nightshadow

    Registrado:
    12 Sep 2015
    Mensajes:
    676
    Me Gusta recibidos:
    842
    Trofeos:
    355
    Género:
    Masculino
    Ubicación:
    USA
    Local Time:
    14:26
    IGN:
    Ghost/Reclaimer
    Job:
    Night Lord
    Level:
    200
    Guild:
    Project
    Yeah it just makes the code more readable. I was taught to only use breaks for switch statements so I never look for them in normal loops
     

Compartir esta página