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

Find the measure of the missing angle Answer: a=
GIVING BRAINLIEST TO BEST ANSWER!! 3. A Juan y a Marta ___________ gusta bailar. 4. A mí ____________ moolesta la música rock. 4th question take an o off the th
how do i solve this (see image)
for factors that affect capillarity​
throw hot water on someone idiom sentence​
Empareja la frase subjuntiva con la explicación correcta. Match the subjunctive sentence with the correct reason. Israel desea que sus amigos viajen con la esc
Which bodies of water in the list are found to the west of the Philippines?​
Help me please. I did the rest I just need f thank you
Sabah has $450 to pay for college textbooks. She expects to pay about $75 per book. Her friend told her that 4 of them can be checked out of the library for fre
The cost of a machine is supposed todepreciate each year by 12% of its value atthe beginning of the year. If the machine isvalued at 344,000 at the beginning of