A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
Python program (save as word_count.py):
from collections import Counter
import re
def count_word_frequency(file_path: str) -> None:
with open(file_path, "r", encoding="utf-8") as f:
text = f.read().lower()
# Split on non‑alphabetic characters
words = re.findall(r"[a-zA-Z']+", text)
counts = Counter(words)
for word, freq in counts.items():
print(f"{word}: {freq}")
if __name__ == "__main__":
# Replace 'input.txt' with the path to the text file
count_word_frequency("input.txt")
Git and GitHub steps (command line workflow):
- In a terminal, go to the folder that contains
word_count.py:cd path/to/your/project - Initialize a local Git repository:
git init - Stage the Python file:
git add word_count.py - Commit with a message:
git commit -m "Add word frequency counter script" - In GitHub, create a new, empty repository (no README, license, or .gitignore) and copy its clone URL.
- Connect the local repo to the new GitHub repo and push:
git remote add origin <clone URL> git push -u origin main
After these steps, the Python program is tracked in Git and available in the new GitHub repository.
References: