Automatically Reply to Tweets 

Make a service that automatically replies to tweets asking if numbers are prime.

Initialize a value to keep track of the latest processed tweet.

In[1]:=
Click for copyable input
X

Send a tweet with the hashtag #IsItPrime for testing.

In[2]:=
Click for copyable input
X
Out[2]=

Create a function that extracts integers from a tweet and determines if they are prime.

In[3]:=
Click for copyable input
X

Create a function that constructs a reply to an #IsItPrime tweet.

In[4]:=
Click for copyable input
X
In[5]:=
Click for copyable input
X
In[6]:=
Click for copyable input
X

Put the pieces together in a function that collects, analyzes, and responds to tweets.

In[7]:=
Click for copyable input
X

Test the function on any tweets with the #IsItPrime hashtag, including your own.

In[8]:=
Click for copyable input
X
Out[8]=

Run the function in a scheduled task that wakes up to process tweets every two minutes.

In[9]:=
Click for copyable input
X
Out[9]=