\n
\n\n\n\n\n\n\"\"\"}\n\n{\n\"input_type\": \"number\",\n\"label\": \"n (Total Items)\",\n\"min\": 0,\n\"default\": 5\n}\n\n{\n\"input_type\": \"number\",\n\"label\": \"k (Items to Choose)\",\n\"min\": 0,\n\"default\": 3\n}\n\n\nhttps://www.calculatorsoup.com/calculators/discretemathematics/permutations.php\n\nhttps://www.mathsisfun.com/combinatorics/combinations-permutations.html\n\nhttps://www.omnicalculator.com/math/permutation-combination\n\n\n\n\n\"\"\"\nprint_article(primary_keyword=\"permutation graphing calculator\", related_keywords=related_keywords, internal_links=internal_links, code_output=code_output)\n\n\nimport requests\n\ndef generate_image(prompt, output_path, api_key=\"INSERT_API_KEY\"): \n headers = {\"Authorization\": f\"Bearer {api_key}\"}\n data = {\n \"prompt\": prompt,\n \"num_images\": 1,\n \"size\": \"1024x1024\"\n }\n r = requests.post(\"https://api.openai.com/v1/images/generations\", headers=headers, json=data)\n url = r.json()[\"data\"][0][\"url\"]\n img_data = requests.get(url).content\n with open(output_path, \"wb\") as f:\n f.write(img_data)\n return url\n\n\n# Example of how to call this in your script:\nimage_url = generate_image(\"A professional, high-quality image of a permutation graph on a blackboard with chalk, math-related, educational style, vibrant colors, clear mathematical notation, 16:9 aspect ratio\", \"permutation_graph.png\")\nprint(\"Generated image at:\", image_url)\n\n\"\"\"\n\n\n\nPermutation Graphing Calculator
\n \n\n \n \n
\n \n \n \n \n
\n \n \n \n \n
\nResults
\nPermutation Formula (P(n, k)): (n!)/(n-k)!
\nTotal Permutations: 0
\nn: 5
\nk: 3
\n(n-k): 2
\n \nGraph of Permutations
\n \n\n\n\n\n \n \n \n \n \n \n