Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Intuitively understanding Python
Post: Intuitively understanding Python

I've been learning Python from one of the No Starch Press books. "Python Crash Course" by Eric Matthes. I've started on the first project - an Alien Invasion game. I can copy/paste code from the book ...
iofhua News and Discussions 3 2,215 Feb-03-2020, 05:28 PM
    Thread: Count the number of items in a nested list
Post: RE: Count the number of items in a nested list

print(len(inv['cash']))Is what I wanted. Thank you. inv = { 'cash': ['gold', 'gold'], } print(inv['cash']) # This prints the 'cash' list print(' '.join(inv['cash'])) # This prints the 'cash' li...
iofhua General Coding Help 2 3,448 Jun-07-2019, 06:47 PM
    Thread: Count the number of items in a nested list
Post: Count the number of items in a nested list

inv = { 'cash': ['gold', 'gold'], } print(inv['cash']) print(' '.join(inv['cash'])) print(' '.count(inv['cash']))I can print the 'cash' list. I can print the 'cash' list with the brackets and ...
iofhua General Coding Help 2 3,448 Jun-07-2019, 06:36 PM
    Thread: Why do i have invalid syntax on a line after print, i see no error ?
Post: RE: Why do i have invalid syntax on a line after p...

Thank you. That makes sense. I have another question now: main_site = ['mayo', 'ketchup', 'mustard', 'milk', 'eggs'] off_site = ['cocoa', 'flour', 'salt', 'bread', 'butter'] purchases = ['ketchup', ...
iofhua General Coding Help 5 2,876 May-24-2019, 05:27 PM
    Thread: Why do i have invalid syntax on a line after print, i see no error ?
Post: RE: Multiple lists & if statements

I wish I could just delete the thread. Sorry!
iofhua General Coding Help 5 2,876 May-24-2019, 05:14 PM
    Thread: Why do i have invalid syntax on a line after print, i see no error ?
Post: Why do i have invalid syntax on a line after print...

main_site = ['mayo', 'ketchup', 'mustard', 'milk', 'eggs'] off_site = ['cocoa', 'flour', 'salt', 'bread', 'butter'] purchases = ['ketchup', 'mustard', 'bread', 'butter'] for purchase in purchases: ...
iofhua General Coding Help 5 2,876 May-24-2019, 05:10 PM
    Thread: learning to while loop
Post: RE: learning to while loop

colours = [] start = True while start == True: colours.append(input('Please enter a favourite color:')) answer = input('Would you like to add another favourite color? (Y/N)') print(answer)...
iofhua General Coding Help 7 2,943 May-23-2019, 04:27 PM
    Thread: learning to while loop
Post: RE: learning to while loop

colours = [] while True: colours.append(input('Please enter a favourite color:')) answer = input('Would you like to add another favourite color? (Y/N)') if answer == "N" or "n": br...
iofhua General Coding Help 7 2,943 May-23-2019, 03:50 PM
    Thread: learning to while loop
Post: RE: learning to while loop

colours = [] while True: colours.append(input('Please enter a favourite color:')) answer = input('Would you like to add another favourite color? (Y/N)') if answer == "N" or "n": Fa...
iofhua General Coding Help 7 2,943 May-23-2019, 03:39 PM
    Thread: learning to while loop
Post: learning to while loop

colours = [] while repeat = True colours.append(input('Please enter a favourite color:')) answer = input('Would you like to add another favourite color? (Y/N)') if answer = "N" or "n": ...
iofhua General Coding Help 7 2,943 May-23-2019, 03:22 PM
    Thread: please help this newb install pygame
Post: RE: please help this newb install pygame

I followed this tutorial here: https://youtu.be/Lp-0d04hfrs which had a link to the pygame libraries here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame The latest pygame library for Windows (p...
iofhua General Coding Help 7 5,848 May-15-2019, 12:42 PM
    Thread: please help this newb install pygame
Post: RE: please help this newb install pygame

Windows 10
iofhua General Coding Help 7 5,848 May-15-2019, 12:24 PM
    Thread: please help this newb install pygame
Post: please help this newb install pygame

I just installed python 3.7.3 What is the command to install pygame? I have tried: pip install pygame pip3 install pygame python3 -m pip install -U pygame python -m pip install pygame Each of the a...
iofhua General Coding Help 7 5,848 May-15-2019, 11:59 AM

User Panel Messages

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