ok, so I’ve just started to learn python so very sorry for being a absolute dumbell. I’m doing some test stuff and noticed when I build and run my programs, they run yes, but they don’t actually do anything. I’ve made sure to set the right language in sublime editor. perhaps it’s something I’ve done wrong? when the console prints out the first question, i type in a number, but then nothing else happens. it seems to only print the first line and that’s it. it’s supposed to prompt the “second:” but it does nothing. I would really appreciate your help. thank you.

  • hot_scarcity@lemmy.dbzer0.comB
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    1 year ago

    You are using a different data type in this case a string to do maths. If you want to do maths associated with numbers you use a data type like int or float.
    Edit: Careful when using sum as a var name because sum() is a built in function in python and that might cause you problems.