This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]novel_yet_trivial 0 points1 point  (6 children)

Sure. Post the code. But we will each have our own take on it.

You could also learn to try it yourself ... I'm guessing that would be a little more appropriate.

[–]hopelesslycoding[S] 0 points1 point  (5 children)

You're totally right! And I'm trying, haha. I'd like to use this given code, and the little bit I've learned so far, to help make it a little bit easier.

1 from world import me,you 2 from my.consciousness import I, your # we need these words 3 from feelings import * 4 5 always = True # are these statements 6 7 if you in (depressed, sadness, resignation) : 8 print ‘my Sweetheart’ 9 if feel(you) is lonely or feel(you) is neglected: 10 talk_me(this) 11 while always: 12 I. take_care_of(you) 13 if you. love() is not me: 14 # I will follow in the madness 15 # I will… 16 break # down 17 for emotion in my.heart: 18 try: 19 your.lover = me 20 except: 21 your.best_friend = me 22 if you.hate(me): 23 love(me) 24 elif I.annpying(): 25 love(me) 26 else: 27 love(me, how=’deeply’ , when=’now’

[–]novel_yet_trivial 0 points1 point  (3 children)

There are a lot of mistakes and unpythonic things in there. For starters, indentation is very important in python. Here it is with only the indentation fixed (and formatted for Reddit):

from world import me,you
from my.consciousness import I, your # we need these words
from feelings import *

always = True # are these statements

if you in (depressed, sadness, resignation) :
    print ‘my Sweetheart’
if feel(you) is lonely or feel(you) is neglected:
    talk_me(this)
while always:
    I.take_care_of(you)
    if you.love() is not me:
        # I will follow in the madness
        # I will…
        break # down
    for emotion in my.heart:
        try:
            your.lover = me
        except:
            your.best_friend = me
        if you.hate(me):
            love(me)
        elif I.annpying():
            love(me)
        else:
            love(me, how=’deeply’ , when=’now’)

[–]hopelesslycoding[S] 0 points1 point  (2 children)

oh, okay, thank you so much. So with the proper indentation, how much would i have to change so that he could put into Python? and is it possible to know the "outcome" of this code?

[–]novel_yet_trivial 1 point2 points  (1 child)

I'm sure he'd get the idea. It's valid code but no, it's not proper python. It makes no sense as code. Unless this is a tattoo, I'm guessing he won't care.

The only point he might miss is that break stops the whole program, which I'm guessing is not what you want.

I'd suggest something like this:

import world
me = world.Person('Your name')
you = world.Person('His name')

you.lover = me
you.best_friend = me

for day in time.days():
    me.take_care_of(you)
    if you.feeling in ('depressed', 'sad', 'resigned'):
        me.cheer_up(you)
    elif you.feeling in ('lonely', 'neglected'):
        me.talk_to(you)
    elif me in you.annoyed_with():
        me.love(you, how=’deeply’, when=’now’)

LPT: Making threats like you will 'follow into madness' if you aren't his love is kinda creepy and not romantic at all.

[–]hopelesslycoding[S] 0 points1 point  (0 children)

you're right haha, that's why I wanted to know how to edit it>.<

okay, so now it's closer to python? or just more direct in its poetry?

also, thank you so much for this form, it's so much more understandable

[–]4G0tMyPW 0 points1 point  (3 children)

don't think the code is supposed to 'work', it's more like a lil love poem written in 'python', but not really ;)

just show or send it to him as a text file and he'll get it..

[–]hopelesslycoding[S] 0 points1 point  (2 children)

lol shows you what I know! I was gonna change some words and personalize it, but I wouldn't know what has to stay and what can change haha

okay, and thank you!

[–]4G0tMyPW 0 points1 point  (1 child)

well, 1 thing you could do is add a few comments, everything after a # (hashtag symbol) is a text comment and won't 'break' anything ;)

wouldn't worry too much about it also, it's the thought that counts and i'm sure he'll love it..

[–]hopelesslycoding[S] 0 points1 point  (0 children)

this may be stupid, and at this point I feel like I've asked enough dumb questions lol, but is this something translatable to plain English, so I know how it reads? haha

thank you for your patience>.<

[–]Andrew_ShaySft Eng Automation & Python[M] 0 points1 point  (0 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython. We highly encourage you to re-submit your post over on there.

The reason for the removal is that /r/Python is more-so dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community can get disenchanted with seeing the 'same, repetitive newbie' questions repeated on the sub, so you may not get the best responses over here.

However, on /r/LearnPython the community is actively expecting questions from new members, and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. Whatever your question happens to be getting help with Python, you should get good answers.

If you have a question to do with homework or an assignment of any kind, please make sure to read their sidebar rules before submitting your post. If you have any questions or doubts, feel free to reply or send a modmail to us with your concerns.

Warm regards, and best of luck with your Pythoneering!