Posts

#4469 Prime Study with Sin and Cos

#4469 Prime Study with Sin and Cos #4469  I want to create an app that takes as input a list of integers and plots Sin(n Pi) for each integer n in the list If you plot $y = \sin(n\pi)$ for any true integer $n$ , you are going to get a shockingly consistent—and potentially very boring—result. Because $\sin(\pi) = 0$ , $\sin(2\pi) = 0$ , $\sin(3\pi) = 0$ , and so on, the output for every single integer will always be exactly 0 . If your goal is to build the app anyway (perhaps as a learning exercise or a baseline for more complex math plots), here is how you can build a quick, clean interactive app using Python and Streamlit (for the web interface) along with Matplotlib (for the plotting). The Code ( app.py ) Python import streamlit as st import matplotlib.pyplot as plt import numpy as np # App title and description st.title( "The Zero-Generator Plotter" ) st.write( "Enter a list of integers to plot $y = \sin(n\pi)$." ) # User input: comma-separated integ...