top of page
Writer's pictureKeith Carter

Now Everyone can Code: Calculating π (pi)


{Prompt}

Let's do some Python programming!

{AI}

That sounds great! What specific task or project would you like to work on in Python today?


{Prompt}

Let's write a program to calculate pi. What are some ways to do it?



I switched over to Claude.ai to do the same thing and had it create a nice program for this, which is available (Click here)


Claude gave a different perspective. Its code was more complex and perhaps more complete.


Next, I asked Claude to create a Jupyter Notebook (I called it a pynotebook, but the AI understood), and it created a beautifully formatted file that was importable to Google Colab. You can check out the Colab (Click here)


Have fun!


This example came from the chapter "Now Everyone is a Programmer" in the book "Know Decide Act: 10x Your Productivity at Work with AI and Automation"



Available at Amazon, Barnes and Noble and more!



2 views0 comments

Recent Posts

See All

Comments


bottom of page