Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: trying to input a variable using random.choice
Post: RE: trying to input a variable using random.choice

perfect! i understand it, and it does just what i want. Thank you!!
python63 General Coding Help 9 3,651 Aug-13-2020, 05:37 PM
    Thread: trying to input a variable using random.choice
Post: RE: trying to input a variable using random.choice

(Aug-13-2020, 03:19 AM)bowlofred Wrote: When you just hit return, the empty string is then assigned to word1 (or the other ones). So you're doing all the work of looking up random words, and then t...
python63 General Coding Help 9 3,651 Aug-13-2020, 02:57 PM
    Thread: trying to input a variable using random.choice
Post: RE: trying to input a variable using random.choice

(Aug-13-2020, 05:34 AM)perfringo Wrote: Using 'list' as a name is not great idea and should be avoided (unless one likes nasty surprises down the road): yeah, i realize that, but just used that in t...
python63 General Coding Help 9 3,651 Aug-13-2020, 01:23 PM
    Thread: trying to input a variable using random.choice
Post: RE: trying to input a variable using random.choice

here is how the output looks with user input. import random list = [] #word1 = input(random.choice(open('nouns.txt').read().split()).strip().upper()) #word2 = input(random.choice(open('nouns.txt').r...
python63 General Coding Help 9 3,651 Aug-13-2020, 01:53 AM
    Thread: trying to input a variable using random.choice
Post: trying to input a variable using random.choice

I've been messing with mad libs, doing them different ways, shortening code, etc, and i switched from getting user input to letting the program pick the word(s). When letting the user pick the words,...
python63 General Coding Help 9 3,651 Aug-13-2020, 12:14 AM
    Thread: Trying to change font size w/o changing button size
Post: RE: Trying to change font size w/o changing button...

(Aug-04-2020, 11:23 AM)Larz60+ Wrote: add width and height values to button to force desired size. when i do that, the button becomes almost as large as the window. the root.geometry('500x500') is ...
python63 GUI 3 9,891 Aug-04-2020, 10:03 PM
    Thread: Trying to change font size w/o changing button size
Post: Trying to change font size w/o changing button siz...

I hope my formatting is proper. My code: from tkinter import * from tkinter import font root = Tk() root.geometry('500x500') root.title('Tkinter Frame Test') myFont = font.Font(family = 'Helvetica', ...
python63 GUI 3 9,891 Aug-03-2020, 11:15 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020