Hello, I am working on Programming I using python language. Our professor gave us a template in which to complete a prog

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Hello, I am working on Programming I using python language. Our professor gave us a template in which to complete a prog

Post by answerhappygod »

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)))
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply