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 positive of medium in a data having 7 terms​
Assume the selling price of your house calculate thecommission amount of your house if the commission rateis 5•/•​
Alexey wrote '1*2*3*... 9 = 21' on the board, inserting a plus or minus signs in place of each little star. Sasha changed some of these signs to their opposites
Consider a hypothetical metal that has a density of 3.55 g/cm3, an atomic weight of 40.48 g/mol, and an atomic radius of 0.135 nm. Compute the atomic packing fa
why is nepal a geographical diversity
need help with finding measurement for the cylinder
write a letter to your house Master telling him about the concerns of the students in the house​
Which expression is equivalent to 83 x 52? A 5(80 x 3) B. 5x (80+3) C. 80 (3x5) D. 80 x (3+5)
How to make a MLA format essay?​
Write a speech to be delivered on your School speech and prize given day on issues affecting your community