On February 5, 2015 6:57:06 PM EST, Edgar Figueroa <[email protected]> 
wrote:
>Hello group.  I'm trying to call the variable "name" within my input ()

You're not needing to call it,  but to use it. The simplest answer is just to 
print the prompt separately,  and just call input  ().

Next option is to build a string in another variable,  like prompt= and then do 
input (prompt)

But there's no reason you can't just pass a single string expression directly 
to input.  Something like

X = input (name + ", what's your favorite food? ")

Now input gets exactly one argument. 

>function.
>Here's what I have:
>name = input("Hello. What's your name? ")
>print("\nHello", name, ". Nice to meet you.")
>favFood1 = input("\n", name, ", what's your favorite food? ")
>Obviously it isn't working.  It tells me I have too many arguments for
>the input () function.  Basically, I want the output to read as
>follows:
>Hello. What's your name?
>user enters "Frank"
>Hello Frank. Nice to meet you.
>Frank, what's your favorite food?
>Any help would be greatly appreciated. 
>Thanks.                                          
>_______________________________________________
>Tutor maillist  -  [email protected]
>To unsubscribe or change subscription options:
>https://mail.python.org/mailman/listinfo/tutor

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to