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

Question 1 of 10 Which nucleus completes the following equation? 239UHe+? A. 228 Th B. 2220 c. 23. Pu D. 78Th SUBMIT
(philosophy) Pojman describes two arguments for moral objectivism. What are these arguments and how do they differ?
What does it mean to make "difficult choices" when creating a federal budget? deciding how to keep interest rates on the national debt low deciding which countr
Can someone help me with this math homework please!
4. A body in motion is said to be in equilibrium when it isA moving with uniform velocity.B at rest.C accelerated by a force.D moving in an indefinite path.​
characteristics of Jesus true brethren​
Kelly is standing in a wavy water and notices the depth of the waves varies in a periodic way that can be modeled by a trigonometric function. She starts a stop
SOMEONEEEE HELPPP MEEEE OUTTTT!!!!
The entire graph of the function f is shown in the figure below. Write the domain and range of f using interval notation.
This is very important ‼️‼️‼️‼️‼️ Describe the types of error that make a poll less than 100% accurate.