omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Calculator Pro

    Pythonista
    7
    12
    9527
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Truppelito
      Truppelito last edited by

      Hi guys! Here is my own calculator that I did entirely on my iPhone in two days. I'm actually pretty happy with the result. In my opinion, it is a more useful calculator than the one that comes with iOS. The one downside is that it takes more taps to open my calcultor in Pythonista than a normal calculator app, and with an iPhone 4 and iOS 7, more taps means exponentially more time... :D

      You can get it here. It should also work on an iPad, but I wouldn't know because I haven't got one.

      Let me know what you think!

      Features:

      • Enter full mathematical expressions with parenthesis (unlike the calculator that comes with iOS)

      • Comparison support: for example, sin(pi) > cos(pi) yields True

      • Trig functions and their arc variations

      • Constants: pi and e

      • Exponentiation, factorization and natural logarithms

      • Press = equal without a current expression to repeat the last calculation (specially useful when paired with the Ans button)

      • Handles errors with style (try dividing by zero to see what happens!)

      • Press the result screen at the top to copy the last result to the clipboard

      PKHG 1 Reply Last reply Reply Quote 0
      • due3die
        due3die last edited by

        @Truppelito Hi, I am getting error @line 188 (indentionError: unindent does not match any outer indentation level)

        1 Reply Last reply Reply Quote 0
        • Truppelito
          Truppelito last edited by

          @due3die Sorry, slight problem when copying & pasting. It should work now, please redownload the gist.

          1 Reply Last reply Reply Quote 0
          • due3die
            due3die last edited by

            @Truppelito Superb...

            1 Reply Last reply Reply Quote 0
            • Sebastian
              Sebastian last edited by

              Nicely done! Great work @Truppelito!
              Just out of curiosity; since you don't have an iPad, did you code this on the iPhone or did you use a computer?
              Because I can imagine it would be exhausting to write all that on just an iPhone XD

              1 Reply Last reply Reply Quote 0
              • Truppelito
                Truppelito last edited by

                @Sebastian As dificult as that may seem, I did write this entirely on my iPhone 4! I was on vacation and I didn't have my computer, but I had this urge to code, for some reason, and Pythonista is such an amazing app... And so it happened that my perserverance outmatched my tiny screen :)

                1 Reply Last reply Reply Quote 0
                • ccc
                  ccc last edited by

                  A stunning demonstration of the addictive nature of Pythonista ;-)

                  1 Reply Last reply Reply Quote 0
                  • Truppelito
                    Truppelito last edited by

                    @ccc Yes, yes it is indeed!

                    1 Reply Last reply Reply Quote 0
                    • n8o
                      n8o last edited by

                      I feel like I'm missing the way to get gists into Pythonista. There doesn't appear to be an easier way than selecting the source manually and copying. Any tips?

                      1 Reply Last reply Reply Quote 0
                      • Truppelito
                        Truppelito last edited by

                        @n8o Yes, in fact there is. On this page, search for Script Integration. That page has loads of cool scripts, and one of them does exactly what you want.

                        1 Reply Last reply Reply Quote 0
                        • PKHG
                          PKHG @Truppelito last edited by

                          I indicated at GitHub a run-time error ;-) and my solution.
                          Plus a wish to add more functionality
                          E,g:
                          Rand gives always a fraction so to have random numbers (1, ..6) you
                          need to get rid of fraction part (after multiplication etc.)

                          1 Reply Last reply Reply Quote 0
                          • PeterG
                            PeterG last edited by

                            Who is willing to help understanding the code, to add more working buttons?

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Powered by NodeBB Forums | Contributors