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
antiseptic1488 [7]
3 years ago
10

Assume the variable sales references a float value. Write a statement that displays the value rounded to two decimal points.Assu

me the following statement has been executed:
number = 1234567.456
Write a Python statement that displays the value referenced by the number variable formatted as
1,234,567.5
Computers and Technology
1 answer:
romanna [79]3 years ago
3 0

Answer:

The statement is as follows:

print("{0:,.1f}".format(number))

Explanation:

Required

Statement to print 1234567.456 as 1,234,567.5

To do this, we make use of the format keyword, and we set the print format in the process.

To round up number to 1 decimal place, we use the following format:

"{0:,.1f}"

To include comma in the thousand place, we simply include a comma sign before the number of decimal place of the output; i.e. before 1

"{0:,.1f}"

So, the print statement is:

print("{0:,.1f}".format(number))

You might be interested in
Help pls . computer class
ladessa [460]

Answer:

3rd , 4th, 1th

Explanation:

8 0
4 years ago
What is a document?
kotykmax [81]

Answer:

answer is Set of information gathered together

4 0
3 years ago
Read 2 more answers
someone help me I don't know what else to do it's on my console someone tell me some steps to fix it I really want to use it aga
galben [10]

Answer:

put it in the microwave

Explanation:

tell dad to go get milk

8 0
3 years ago
Declare and implement a function called gameOver.gameOver receives a single 3x3 char[] [] array as a parameter, representing a t
svlad2 [7]

Answer:

The function in C++ is as follows:

char gameOver(char arr[][3]){

   char winner = ' ';

   if((arr[0][0] == 'X' && arr[0][1] == 'X' && arr[0][2] == 'X') ||(arr[1][0] == 'X' && arr[1][1] == 'X' && arr[1][2] == 'X') || (arr[2][0] == 'X' && arr[2][1] == 'X' && arr[2][2] == 'X')||(arr[0][0] == 'X' && arr[1][0] == 'X' && arr[2][0] == 'X') ||(arr[0][1] == 'X' && arr[1][1] == 'X' && arr[2][1] == 'X') || (arr[0][2] == 'X' && arr[1][2] == 'X' && arr[2][2] == 'X')){

       winner = 'X';

   }

   else if((arr[0][0] == 'O' && arr[0][1] == 'O' && arr[0][2] == 'O') ||(arr[1][0] == 'O' && arr[1][1] == 'O' && arr[1][2] == 'O') || (arr[2][0] == 'O' && arr[2][1] == 'O' && arr[2][2] == 'O')||(arr[0][0] == 'O' && arr[1][0] == 'O' && arr[2][0] == 'O') ||(arr[0][1] == 'O' && arr[1][1] == 'O' && arr[2][1] == 'O') || (arr[0][2] == 'O' && arr[1][2] == 'O' && arr[2][2] == 'O')){

       winner = 'O';

   }

   return winner;

}

Explanation:

The function checks for the winning character by checking for matching rows and matching columns.

When either X or O fall in the any of the following 6 conditions , then that character (X or O) wins.

The position are:

Rows: (1) 00, 01 and 02 (2) 10, 11 and 12 (3) 20, 21 and 22

Columns: (4) 00, 10 and 20 (5) 01, 11 and 21 (6) 02, 12 and 22

So, the explanation is:

This defines the function gameOver

char gameOver(char arr[][3]){

This initializes winner to blank space

   char winner = ' ';

If any of the condition stated above matches X, then X wins

<em>    if((arr[0][0] == 'X' && arr[0][1] == 'X' && arr[0][2] == 'X') ||(arr[1][0] == 'X' && arr[1][1] == 'X' && arr[1][2] == 'X') || (arr[2][0] == 'X' && arr[2][1] == 'X' && arr[2][2] == 'X')||(arr[0][0] == 'X' && arr[1][0] == 'X' && arr[2][0] == 'X') ||(arr[0][1] == 'X' && arr[1][1] == 'X' && arr[2][1] == 'X') || (arr[0][2] == 'X' && arr[1][2] == 'X' && arr[2][2] == 'X')){</em>

<em>        winner = 'X';</em>

<em>    }</em>

If otherwise that it matches O, then O wins

<em>    else if((arr[0][0] == 'O' && arr[0][1] == 'O' && arr[0][2] == 'O') ||(arr[1][0] == 'O' && arr[1][1] == 'O' && arr[1][2] == 'O') || (arr[2][0] == 'O' && arr[2][1] == 'O' && arr[2][2] == 'O')||(arr[0][0] == 'O' && arr[1][0] == 'O' && arr[2][0] == 'O') ||(arr[0][1] == 'O' && arr[1][1] == 'O' && arr[2][1] == 'O') || (arr[0][2] == 'O' && arr[1][2] == 'O' && arr[2][2] == 'O')){</em>

<em>        winner = 'O';</em>

<em>    }</em>

This returns the winner (either O, X or blank)

   return winner;

<em>See attachment for complete program which includes the main</em>

Download cpp
7 0
3 years ago
Lisa and her team have finished the coding of a new application, and they are ready to begin testing. She asks Tina, a senior so
lozanna [386]

The name of this process is quality testing

<u>Explanation:</u>

Lisa team has to test the new application; to do this process is called quality testing. Quality testing team has to simulate or test the new application and check each process in the new application such as speed of application, saving the data correctly, monitor and generate maximum error and make sure the new application is error free.

For example even mouse movement and displaying valid data in required field. QC test team should minimum knowledge of new application and small business knowledge.

8 0
3 years ago
Other questions:
  • Opportunity cost is the least desirable alternative given up as a result of a decision.
    6·1 answer
  • What may happen if a large number of computer users are attempting to access a web site at the same time that you are
    9·2 answers
  • "Memory refers to: A.the brain processes involved in the encoding, storage, and retrieval of information. B.the mechanisms drivi
    9·1 answer
  • The latest form of personal communication that most resembles a public journal is a _____.
    15·2 answers
  • Research and discuss the similarities and differences between cloud computing and client-server computing. Discuss the pros and
    11·1 answer
  • Sharon is troubleshooting a computer and wants to test the hard drive in another computer. Sharon removes the hard drive and not
    14·1 answer
  • A wireless network does not benefit like a wired network does, when it comes to collision reduction. Which device reduces collis
    6·1 answer
  • What is the term used to describe the basic unit of data passed from one computer to another
    14·1 answer
  • Please anyone, help me.... I'm not sure how to put these all together.<br> 35 points!
    15·2 answers
  • Help me. its due tonight
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!