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]:= | X |
Send a tweet with the hashtag #IsItPrime for testing.
| In[2]:= | X |
| Out[2]= |
Create a function that extracts integers from a tweet and determines if they are prime.
| In[3]:= | ![]() X |
Create a function that constructs a reply to an #IsItPrime tweet.
| In[4]:= | X |
| In[5]:= | ![]() X |
| In[6]:= | X |
Put the pieces together in a function that collects, analyzes, and responds to tweets.
| In[7]:= | ![]() X |
Test the function on any tweets with the #IsItPrime hashtag, including your own.
| In[8]:= | X |
| Out[8]= |
Run the function in a scheduled task that wakes up to process tweets every two minutes.
| In[9]:= | X |
| Out[9]= | ![]() |



