Post Reply 
python program with formatted input and output
06-18-2021, 02:08 PM
Post: #2
RE: python program with formatted input and output
(06-18-2021 03:37 AM)Liamtoh Resu Wrote:  Here is a simple prime python program that features formatted input and output statements.

It just averages three values entered by a user.

Code:


   print("the average is {0:.5f}".format(q))

I included this code in another thread but I thought it might get buried
for another user looking for the formated input and output.

Thanks.

The above won't work on my Prime. I need to use the older format statement something like this:

Code:
print("the average is %.5f" %(q))

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: python program with formatted input and output - toml_12953 - 06-18-2021 02:08 PM



User(s) browsing this thread: 1 Guest(s)