logo
 drop

Main

Community

Submissions

Help

84294831 visitors

Recent Posts

Pages: [1] 2 3 4 5 6 ... 10

Started by creeperton - Last post by creeperton on Today at 01:07:08 pm

I'm trying to make a function that will append an item to a list based on user input.  Python 2.7.8, Windows 7.

Code: [Select]
# Lab 4.1 Create five separate lists.  Each list should have a theme and the
# theme should be reflected in the list name and its elements.  Examples are:
# pets = ['dog', 'cat', 'rat']
# numbers= [34, -1232, 456, 2134]

weather = ['Clear','Rain','Snow','Storm','Windy','Hail','Fog']

locations = ['Park','Forest','Beach','River','Library','Cafe','College',
'Apartments','Home']

actions = ['Walk','Examine','Activate','Talk','Wait','Eat','Sleep','Read',
'Think','Choose']

day = ['Morning','Mid-day','Afternoon','Evening','Twilight','Night',
'Late Night','Dawn']

animals = ['fish','Crow','Deer','Seagull','Mosquito','Racoon','Skunk',
'Cougar']

# Lab 4.2 Using the lists you defined in 4.1, define functions that
# demonstrate your knowleldge of the list functions: append, extend,
# remove, pop, index, sort, and reverse.  Write at least 2 examples
# using each function.

def listAppend():
# ^This is the start of the generic list selection code.
    listName = str(raw_input('You choose to append an item to a list.\nFirst we'
    ' must select a list.\nType the name of one of these lists to see its'
    ' elements:\nweather, locations, actions, day, or animals.\n'
    'Which list do you want to view? '))
# ^get name of list to append an element
    if listName == 'weather' or 'Weather':
        for i in weather:
            print i
    elif listName == 'locations' or 'Locations':
        for i in locations:
            print i
    elif listName == 'actions' or 'Actions':
        for i in actions:
            print i
    elif listName == 'day' or 'Day':
        for i in day:
            print i
    elif listName == 'animals' or 'Animals':
        for i in animals:
            print i
# ^print all the elements in the selected list
    else:
        print 'There is no list available under that name!'
# ^print if user mistypes name of list
# ^the generic list selection input code ends in the line just before this comment.
    appendElement = raw_input('Please type the element you wish to append to'
    ' the selected list: ')
# ^get the element user wants to append to list
    appendCheck = str(raw_input(appendElement + ' Is this correct, yes or no? '))
    if appendCheck == 'yes' or 'Yes':
        pass
    elif appendCheck == 'no' or 'No':
        print 'I\'m sorry, but it seems you mistyped your element.  Try again'
# ^check with user to make sure element is correct.  pass if t, break if f
    appendEleType = str(raw_input('Is the new element a string, float, or'
    ' integer?  Please type the word as it is spelled here and press enter. '))
# ^get element type from user
    if appendEleType == 'string':
        str(appendElement)
    elif appendEleType == 'float':
        float(appendElement)
    elif appendEleType == 'int':
        int(appendElement)
# ^wrap element type with proper conversion function
    newList = eval(listName + '.append(' + appendElement + ')'
    for i in newList:
        print i

listAppend()
The prompts work fine but the output is:
Code: [Select]
w
e
a
t
h
e
r

What am I doing wrong?

Started by Seeeeph - Last post by Verba93 on Today at 12:49:48 pm

Would you perhaps be willing to post an example of the voice acting from the introduction? Just out of curiosity. Sounds like an awesome plan, definitely, and we know the SNES is able to pull that off, thanks to Star Ocean and Tales of Phantasia :D

Started by justin3009 - Last post by justin3009 on Today at 11:46:41 am

That line makes MUCH more sense now.  I'm starting a mini excel file as well with the original dialogue blocks, location, a translated line, final line and the final offset.  So if everything goes accordingly, I'll release that with the translation so people can mess with the translation how they want to... I should probably include the new table as well once it's more steady.

Edit: ...I'm so sorry to do this again.  Reuploaded ANOTHER version.  NOW it contains all the in-game text.  There were pointers that are not taken into account for normally and I finally found them and what not.  There's not much text added at all.  Just a few lines of 'Whom should I fight?' *Insert senshi  name here* and something about Saturn, that's about it!

Started by gc8tech - Last post by Lestat on Today at 07:30:27 am

Started by Darkon360 - Last post by Darkon360 on Today at 03:47:38 am

Thanks, XDelta it is.

Started by Mayorofunkytown - Last post by Mayorofunkytown on Today at 03:25:02 am

Damn I think that's a little more than I want to go through. That however makes me think of the Armos statues. What's with them only hurting you when you awaken them from the bottom? Is that something that can be changed??

Started by justin3009 - Last post by aishsha on Today at 02:05:06 am

Then, vice verse, yeah) Never played the game :)

Started by Piotyr - Last post by obscurumlux01 on Today at 01:48:38 am

A nice 'hack' archive, notably containing a Japanese hack for the Star Ocean SFC (Super Famicom) game.
http://www.romhacking.net/forum/index.php/topic,18822.msg267783.html

And as for hack ideas for that same game, how about the ability to mute/remove certain sound effects via romhacking?
http://www.romhacking.net/forum/index.php/topic,18825.msg267811.html

Started by justin3009 - Last post by Seihen on Today at 01:31:43 am

Chibiusa:
Come back in ten years, if you wanna beat me, rookie! (You're ten years early to beat me).

One small thing: the name mentioned at the top is the addressee (the speaker, Usagi, is addressing ChibiUsa).
"You've got 10 more years to go if you think you're gonna beat me, ChibiUsa!"

Think you can beat Usagi like that?!
Think again! (Usagi's unbeatable!)

"There's no way I'd lose to someone like you, Usagi!"
(here, ChibiUsa is the speaker)

Started by Kafke - Last post by Seihen on Today at 01:28:29 am

The good news is that I've found the font files. There's 8 of them (2 for english, 2 for each kana, and 2 for kanji). The bad news is that I can't figure out the image format. Haha, though it's not actually just a square. This is actually what I was referring to: http://i.imgur.com/2MCQsSb.png. That screenshot is actually a bit clearer than when I was looking at it (it moves around too). I'd imagine if you were familiar with the language, it's easy to know which it is. But honestly, I can't tell where the lines are, and it just looks like a big blob with an L next to it.

Aah, I gotcha. Yeah, if you don't know the language (and even when you're learning), it's really hard to tell one thing from the next!
That one seems to be 道 (road/way/path/what-have-you).

As for the image file formats, unfortunately I'm afraid I'll have to leave that to others. Seems like you're making good progress, though!
Pages: [1] 2 3 4 5 6 ... 10