def question():
    form = SQLFORM.factory(
        Field('what',label='what do you want?'), 
        Field('why',label='why do you want it?'))
    if form.process().accepted:
        z = 'you want %s because %s' % (form.vars.what, form.vars.why))
    return locals()
                                   

def question(x):
x = raw_input("What do you want? ")
z = raw_input("Why do you want it? ")
z = z.replace("my", "your")
z = z.replace("I", "you")
print "So you want", x, z
print " "
a = raw_input("and why do you want that? ")
a = a.replace("because I want", "")
print " "
print "so you want",a
print " "
b = raw_input("And why do you want that? ")
print " "
print b, "- that's what's purposeful to you "



On Thursday, 28 February 2013 21:10:20 UTC-6, Nicholas Brajkovic wrote:
>
> I've begun learning python from an ebook called "RealPython"
> and created my first app:
>
>
> "
>
> def question(x):
> x = raw_input("What do you want? ")
> z = raw_input("Why do you want it? ")
> z = z.replace("my", "your")
> z = z.replace("I", "you")
> print "So you want", x, z
> print " "
> a = raw_input("and why do you want that? ")
> a = a.replace("because I want", "")
> print " "
> print "so you want",a
> print " "
> b = raw_input("And why do you want that? ")
> print " "
> print b, "- that's what's purposeful to you "
>
> "
>
>
> which can be called with:
> question("x")
>
> Now I really like the RealPython book because the author explains it to me
> and I 'just get it' but when it comes to reading the web2py manual.. I 
> just don't get it
> for example why does everything always get defined with a return dict() 
> after it.. anyways
> If anyone could please help me grasp how to convert the above Idle app 
> into a web2py app
> it would be greatly appreciated.
>
> I would also be willing to throw in $30 AUD and chat over skype if someone 
> is willing to guide me
> into developing a better understanding.
>
>
>
> Kind regards,
>
> Nicholas
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to