-
Notifications
You must be signed in to change notification settings - Fork 169
Expand file tree
/
Copy pathsimple_calendar.py
More file actions
32 lines (24 loc) · 846 Bytes
/
simple_calendar.py
File metadata and controls
32 lines (24 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import tkinter as tk
from tkinter import messagebox
def main():
root = tk.Tk()
root.title("Habit Tracker")
root.geometry("400x300")
tk.Label(root, text="Habit Tracker App").pack(pady=10)
tk.Label(root, text="Enter Habit:").pack(pady=5)
habit_entry = tk.Entry(root)
habit_entry.pack(pady=5)
def add_habit():
habit = habit_entry.get()
if habit == "":
messagebox.showerror("Error", "Please enter a habit")
else:
print(f"Added habit: {habit} (placeholder)")
tk.Button(root, text="Add Habit", command=add_habit).pack(pady=5)
tk.Button(root, text="Exit", command=root.destroy).pack(pady=5)
root.mainloop()
if __name__ == "__main__":
main()
# habit_tracker.py (continued)
def show_streaks():
print("Showing habit streaks (placeholder)")