1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
saul85 [17]
3 years ago
10

Write a method named addCommas that accepts a string representing a number and returns a new string with a comma at every third

position, starting from the right. For example, the call of addCommas("12345678") returns "12,345,678".

Computers and Technology
1 answer:
pentagon [3]3 years ago
6 0

Answer:

Locale unaware

'{:,}'.format(value) # For Python ≥2.7

f'{value:,}' # For Python ≥3.6

Locale aware

import locale

locale.setlocale(locale.LC_ALL, '') # Use '' for auto, or force e.g. to 'en_US.UTF-8'

'{:n}'.format(value) # For Python ≥2.7

f'{value:n}' # For Python ≥3.6

You might be interested in
List five things that could cause premature bearing failure
Wewaii [24]
Smoking, Drinking, Use of drugs, problems with uterus, Problems with cervix or placenta.


6 0
3 years ago
The music is the soul who says this
Crazy boy [7]

Question:the music is the soul who says this

Answer: Arthur Schopenhauer

Explanation: he says music is the language of feeling and of passion

question answered by

(jacemorris04)

4 0
3 years ago
1. If Earth's plates are constantly moving, why don't we need to update the locations of -
Dmitriy789 [7]

Answer:

Because the tectonic plates are moving so slowly in such small incraments that it would take a while before there was any noticable change.

Explanation:

4 0
3 years ago
Sptr is a pointer pointing to the beginning of an array called sarray. To access the value in sarray[3] by using the pointer, yo
kupik [55]

Answer:

The correct option for accessing the value in sarray[3] is : d) *(sptr+3)

Explanation:

a) *sptr[*3]  is wrong option because its syntax is not right it will give errors.

b) *sptr+3 is also wrong option because it will add 3 to the value of sarray[0].

c) sptr+3 is wrong option because it will only access the address of sarray[3] not the value it contains.

d) *(sptr +3) is correct syntax for accessing value in sarray[3] by using pointer

4 0
3 years ago
Which of the following are pointers? Select all that are correct. hub node router transmission media switch port interconnector
Sphinxa [80]
Hub , switch port , transmission media , hope I helped
4 0
3 years ago
Read 2 more answers
Other questions:
  • To place the caption at the top of the image, you will need to change the __________ in the
    5·2 answers
  • The code segment below uses the procedure IsPartOf (list, item), which returns true if item appears in list and returns false ot
    13·1 answer
  • Variables set equal to patterns are said to be:_______.
    7·1 answer
  • 2. The part of the computer that provides access to the Internet is the A. monitor. B. keyboard. C. system unit. D. modem.
    11·2 answers
  • The "Rudolph Rule" is best described by which of the following?
    9·1 answer
  • What group in the review tab contains the commands and to accept or reject changes made to a document
    14·2 answers
  • Cerise is explaining computer viruses to her students. What is the best way for her to explain a computer virus?
    6·2 answers
  • Prokaryotes are __________________ and include ________________________.
    8·1 answer
  • How do you stop getting emails from brainly saying "sarah from brainly has answered your question"
    10·1 answer
  • Explain the concepts of GIGO—garbage in, garbage out. Why do you think it’s a helpful concept in coding? How do you think it can
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!