2. When large numbers are written out on paper, it is traditional to use commas to separate the digits into groups of th

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

2. When large numbers are written out on paper, it is traditional to use commas to separate the digits into groups of th

Post by answerhappygod »

2 When Large Numbers Are Written Out On Paper It Is Traditional To Use Commas To Separate The Digits Into Groups Of Th 1
2 When Large Numbers Are Written Out On Paper It Is Traditional To Use Commas To Separate The Digits Into Groups Of Th 1 (31.24 KiB) Viewed 27 times
2. When large numbers are written out on paper, it is traditional to use commas to separate the digits into groups of three. For example, the number one million is usually written in the following form: 1,000,000 To make it easier for programmers to display numbers in this fashion, implement a function def addCommasToNumericString(digits): that takes a string of decimal digits representing a number and returns the string formed by inserting commas at every third position, starting on the right. For example, if you were to execute the program while True: digits input("Enter a numeric string: ") = if len(digits) = == 0: break else: print(addCommasToNumericString(digits))
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply