jm112893 jm112893
  • 10-02-2024
  • Computers and Technology
contestada

I am not sure what I am doing wrong in this python code. My code works fro the first inputs but does not produce an output with any other values.

I am not sure what I am doing wrong in this python code My code works fro the first inputs but does not produce an output with any other values class=

Respuesta :

sqdancefan
sqdancefan sqdancefan
  • 10-02-2024

Answer:

  straight-line code is executed exactly once

Explanation:

You want the reason your code does not produce more than one set of outputs.

Straight-line code

Your code reads two inputs, swaps them, outputs the swapped values, and stops. This will give the behavior you have described.

If you want it to repeat, you need to put the code in a loop. Usually, such a loop will have a terminating condition, such as a number of executions, or an input value signifying the end of input data.

Answer Link

Otras preguntas

After World War I japan became a dominant power by basing their economy on agriculture. T/F
When inventory costs are​ decreasing, the lifo costing method will generally result​ in: a. the same inventory value as fifo. b. a higher gross profit than unde
Please answer I’ll rate brainlyest
express it in slope-intercept form​
The Normans used only English and French in their literature. True or False
what tissue does the skin of a chicken wing attach to GIVING BRAINLIEST
Please help trig 20 points!!?!?
What is the domain and range of y=-3
Which of the following positions is a necessary role for all business, as they track financial flow expenses,and revenue. A. Adminstrator B. Accountant C. Sales
s.Lewis has a net spendable income of $2,000 per month. He sets up the following transportation budget for himself. 3. Transportation (15% - 20%) 400 a. Car