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

a line segment has an endpoint at (-3,9), and its midpoint is at (3,3). what is the ordered pair for the other endpoint if the line segment.
one of the best ways to elaborate on a main idea is to​
4.Do you think the southern hemisphere is experiencing summer on june 21? why? or why not?
What is the volume of a pyramid 4 cm,4 cm by 12 cm
Read the text, then answer the question that follows: Wild animals as viewed from a mountain camp—Camille Grant, October 2011 Through my binoculars, I viewed
What is −123⋅(−514) ? −834 −516 516 834
Three point charges are arranged on a line. Charge q3 = 5 nC and is at the origin. Charge q2 = - 3 nC and is at x = 4 cm. Charge q1 is at x = 2 cm. What is q1 (
pls helpBeth is four years older than two thirds the age of milo.If beth is fourteen how old is milo?​
can someone please help me with number 16 please and thanks ​
for what reason would someone use online reading tool ? check all that apply