python 3.x - How do I input an integer on a new line -


i trying make input integer on new line using python, error when this.

#inputs mymath integer print = ("give me number , double you.") mymath = int(input + "\n")  #multiplies mymath(the variable) times 2 result = eval("2 * mymath") 

the error says "typeerror: unsupported operand type(s) +: 'builtin_function_or_method' , 'str'" using python 3.5.1.

here want:

yourval = int(input("double number:\n")) result = yourval*2 print(result) 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -