rylan8394 rylan8394
  • 01-02-2018
  • Computers and Technology
contestada

Given the variables name1 and name2, write a fragment of code that assigns the larger of their associated values to first.

Respuesta :

Kalahira
Kalahira Kalahira
  • 14-02-2018
We can compare strings like numbers,
 if "a" > "b":
   do something
   Solutions will be

   Python:
  first = max(name1, name2)
 second = min(name1, name2)

   Or if we are not supposed to use max() and min(), we can achieve the same thing with a conditional,
 Python:
  if name1 > name2: ...
Answer Link

Otras preguntas

why is the specific heat of water 1 Cal/g×°C?
Help with this math question
When did racism begin ?
What would you expect to happen to the striated bands in a skeletal muscle cell when the muscle contracts?
there are four types of biomes. true or false
which fraction is larger 7/16 or 51/100?
If y varies directly with x, and y is 14 when x is 2, what is the value of x when y is 35?
Which of the following situations is one where the goal of efficiency is being met?
What does GMO stand for. Explain what it is in your own words. I know what GMO stands for....but i cant understand how to explain it
What are five key accomplishments of Marie and/or Pierre Curie? will mark brainly.