+ 2

can i define a function that asks for a user input add then prints the result.

def add_number(x=float(input()),y=float(input())): print (x+y)

16th Aug 2016, 7:51 AM
Kaka
Kaka - avatar
1 Respuesta
+ 4
def add_number_for_user_input(): x = float(input()) y = float(input()) print(x+y)
16th Aug 2016, 8:30 AM
jimmy chen
jimmy chen - avatar