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

The sum of three consecutive multiples of 11 is 165. Find these three multiples.​
Find the area of square alone woodside 72 metre
challenges of owning a tarven​
The sum of three numbers is 14 and the sum of their squares is 100. find the sum of cubes of those three numbers if their product is 24.
The point u(4,-1) is reflected over the x axis
Nielson Motors has a share price of $50.00. Its dividend was $2.50, and you expect Nielson Motors to raise its dividend by approximately 6% per year in perpetui
The Antarctic Treaty divides the continent into how many zones? 1) Four 2) Six 3) Eight 4) Ten
Rohan bought a motorbike for rupees 5675 and spent 453 rupees on its repiar. Then he sold it for 1265. Find out the profit or loss he made.​
answer all pleaseee
if the atmospheric is 103.2 kpa and the absolute pressure at the bottom of the tank is 230 kpa. what is the specific gravity of olive oil?