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

ik i already asked for help once but like plz ;(
As a character of all living things, homeostasis relates most directly to which of the following biological themes
How fountain pen is filled with ink
What does it mean when ones ideas must be broad as nature if they are to interpret nature?
5.5B+4R=285, point, 5, B, plus, 4, R, equals, 28 The above equation is true if Amit buys BBB pounds of blueberries and RRR pounds of raspberries at a farm where
Jadas family has completed 30% of a trip. They have traveled 15 miles. How far is the trip
What major power left WWI and what were the reasons?
What is the factored form of the quadratic expression x^2+36
Which equation is equivalent to 2 4x = 8x-3
There are one or more leaders in an autocracy. True or false