anonymous
  • anonymous
Write a piece of Python code that prints out one of the following messages: "string involved" if either varA or varB are strings "bigger" if varA is larger than varB "equal" if varA is equal to varB "smaller" if varA is smaller than varB
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
and the question is???
anonymous
  • anonymous
I think that is the L2 Problem 11, I mean the statement, remember only if one of those are strings, you should print "string involved", if they're not, (both number) tell if is bigger, equal or smaller.
anonymous
  • anonymous
If you are asking how this is done this is not that hard. Here is some pseudocode. If varA or varB is a string then print "string involved" else if varA is greater than varB then print "bigger" else if varA is equal to varB then print "equal" else print "smaller" Even though this is pseudocode it almost matches real code since it is a fairly simple problem. To change this to actual code should not take much.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
If (type(varA)==string) or (type(varB)== string: print "string involved" elif varA >varB: print "bigger" elif varA

Looking for something else?

Not the answer you are looking for? Search for more explanations.