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

What is the primary responsibility of scientists in the process of making environmental law?to represent the interests of the business communityto sue the gover
PLEASE HELP ASAP BIG POINTS The projectile motion of an object can be modeled using s(t) = gt2 + v0t + s0, where g is the acceleration due to gravity, t is the
The circumstance of a circle is represented by 2 pie r. If the radius of the circle is double, then the circumference is
What is the result of mixing a water molecule and an oxygen molecule?
which function is the inverse of f(x)=x^2-25
According to the general equation for conditional probability, if P(AD) =4/7 and P(B)= 7/8, what is P(A B)? A.40/49 B. 16/49 C. 32/49 D. 24/49
[Need help Quick!] One reason some argue that campaign financing should be restricted it is because supporting a candidate is considered free speech. the Con
What is the cation in CaCl compound
18. How can you tell if a fraction will have a repeating decimal
Last choice says -a,o please help what are the coordinates of p please help need help ASAP