Skip to content

Instantly share code, notes, and snippets.

View lovemycodesnippets's full-sized avatar

The New Stack lovemycodesnippets

View GitHub Profile
Make this so the results of the character creation are saved to the file dnd_character_creator.txt.
Write a Python program that allows a user to create a Dungeons & Dragons character sheet by asking the standard D&D questions and then rolling the required dice to finish creating the character.
python3 dnd_character_creator.py
"save_button = ttk.Button(button_frame, text="Save Information", comman
... d=self.save_information"
Can you change the background color of the GUI to pink?
sudo apt-get install python3-tk -y
import tkinter as tk
from tkinter import ttk, messagebox
import datetime
class UserInformationApp:
    def __init__(self, root):
Can you turn that same program into a GUI app?
def get_user_input():
    """Get user input for name, age, email, and phone number"""
    print("Please enter your information:")
    name = input("Name: ").strip()
    while not name: