1. 程式人生 > >python習題12

python習題12

ex12

1 age = input("How old are you?")
2 height = input("How tall are you?")
3 weight = input("How much do you weight?")
4 
5 print(f"So,you're {age} old, {height} tall and {weight} heavy.")

在終端上鍵入python -m pydoc input

input(prompt=None, /)
    Read a string from standard input.  The trailing newline is stripped.

    The prompt string, if given, is printed to standard output without a
    trailing newline before reading input.

    If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
    On *nix systems, readline is used if available