GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Python_Basics/python_programs/user_input_float.py at master · learnbyexample/Python_Basics
This repository was archived by the owner on Dec 29, 2020. It is now read-only.
Expand file tree/ Copy pathuser_input_float.pyMore file actions 10 lines (7 loc) · 299 Bytes / Copy pathuser_input_float.pyFile metadata and controls10 lines (7 loc) · 299 Bytes 1 2 3 4 5 6 7 8 9 10 #!/usr/bin/python3 usr_ip = input("Enter a floating point number: ") # Need to explicitly convert input string to desired type usr_num = float(usr_ip) sqr_num = usr_num * usr_num # Limit the number of digits after decimal points to 2 print("Square of entered number is: {0:.2f}".format(sqr_num)) |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |