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

it is best to use____ language when creating technical documents
9 is 0.32% of what number?​
What kind of graphs can you use to understand how people came to the United States?
You are told that a sample of size 225 the mean is 48.5 and the standard deviation is 1.8 the study is reported with 90% confidence level explain how to determ
Protein synthesis occurs in the a. cell body b. axon c. dendrites d. axon terminal
Which function in vertex form is equivalent to fx = 4+x2-2x
WHEN gEORGE AND aNTHEA WERE MARRIED 120 OF THE GUEST aNTHEA'S FAMILY OR FRIENDS. THIS WAS 60 PERCENT OF THE TOTAL number of guest. How many guest were altogethe
QUESTION 9 Resumes are the best source for determining an applicant's prior work performance. True False
Which features do all new rocks formed near an oceanic ridge share? Check all that apply. -pillow-shaped -striped pattern -provide evidence to seafloor spreadin
What is the area of the hexagon? O 60 O 68 O 120 O 106