Pi-thon
by CodeChum Admin
Instructions:
Print out the symbol of Pi and its equivalent using placeholders. Remember the syntax used when using multiple placeholders in a print() function. Tip: to print out the Pi symbol, we need to make use of its Unicode equivalent. Just put '\u03C0' as a substitute of a character placeholder in your print function.
Make use of the float placeholder in your print() function to output the value of Pi. Take note, however, that we only wish to output one decimal of the entire value of Pi, so recall on how to limit the outputted decimals in your code.
The outputted statement must be the same as the one in the sample output shown above.
An initial source code with blanks is provided to you. Just fill out the blanks.
Output
A single line containing the sample output in the description.
π·=·3.1
pi = float(3.1)
print("\u03C0 = ",pi)
Comments
Leave a comment