Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

MINIE Group Title

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

  • 2 years ago
  • 2 years ago

  • This Question is Open
  1. Chris2332 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    and the question is???

    • 2 years ago
  2. Gianko15 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

    • 2 years ago
  3. msmithhnova Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    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.

    • 2 years ago
  4. Loveboy54 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    If (type(varA)==string) or (type(varB)== string: print "string involved" elif varA >varB: print "bigger" elif varA <varB: print "equal" else: print "smaller"

    • 2 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.