Hello, I am working on Programming I using python language. Our professor gave us a template in which to complete a prog
Posted: Sun May 15, 2022 8:19 am
Hello,
I am working on Programming I using python language. Our
professor gave us a template in which to complete a program. The
following in a line of code in the template. Can someone please
explain what the code means? I don't understand what the numbers
and % represent. Any help would be appreciated.
Thank you.
outFile.write(str("%10d %12.2f %8d
%-15s\n" % (idNum, annualIncome, members, states)))
I am working on Programming I using python language. Our
professor gave us a template in which to complete a program. The
following in a line of code in the template. Can someone please
explain what the code means? I don't understand what the numbers
and % represent. Any help would be appreciated.
Thank you.
outFile.write(str("%10d %12.2f %8d
%-15s\n" % (idNum, annualIncome, members, states)))