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

If you were born on March 5th this is the image NASA took:
PLEASE HELP, 40 POINTS!!!!!!!!!!!!!!!!!!! Remember that in Cynthia's physics class, she must turn in four lab reports. For each report, she earns extra credit
You need to make a 1:4 dilution of dye in water so that the total volume in test tube one is 60 ml. From the solution you made in test tube one, you need to mak
What are the phase shift and period for the function y=2cos1/2(0+30°)-4 Phase shift 30° left, period 720° Phase shift 30° right, period 330° Phase shift 30° ri
When do paraguayans actually celebrate their independence? may 25th may 13th may 15th may 17th.
what does the black bass represent in bless me ultima
What is stronger than steel but can’t handle the sun?
How many barrels of oil does the us export per day?.
Find the measure of the missing ANGLE. 20 700 P ?
solve pls brainliest