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

which type of weathering creates karst topography
how long will it take to travel in a her 2,000 miles at a constant speed of 500 mph?
Marcus needs to rewrite f(x) = x2 + 6x + 4 in vertex form. His answer is f(x) = ()2 – 5.
what are 2 examples of how sucralose is negatively affecting sea life in the sea and how
Why did Canada want to increase its population during the mid-to-late 1900s
You are taking a public speaking class and have to give a speech to your class today. You are extremely uneasy and nervous. Which type of stressor are you exper
1, 4, 16, 64, 256 a. 4096 b. 1022 c. 1024 d. 1025
The Greek counterpart to "Cephas" is: Cephas Petri Simeon Petros Peter
Which of the following is an example of a rational motive? A. Liza buys the sneakers the rest of her team has. B. Taylor buys a fancy coat. C. Lin buys a bir
what does sancho decide to do?