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

2sinx / cos3x = tan3x - tanx
list of the following levels of biological organization from smallest to largest and give an example of each
My friends............ to school everyday.(walks/walk)​
What translation rule can be used to describe the result of the composition of (x, y) → (x-9, y -2) and (x, y) + (x + 1, y-2)? (x, y) = (x+8, y– 4) (x, y) = (x
plz download the picture and edit it and send me the answer plz i will mark u as brainlist
which painting is better give ur percentage to our drawing​
What prior knowledge is needed when following a recipe? a. a basic knowledge of cooking terms c. an understanding of the importance of following steps in order
plz help me! i need answers for this
he sum of two numbers is 981. One of the numbers is 703. What is the other number?
can someone give me advise about how to tell someone you still love them after a breakup