Skip Navigation
Jump
Confused about multiplying floating-point & integer values
  • Eh, degrees can be overrated. I don't have one and it hasn't hindered me at all. Ultimately, it depends what kind of work you want to get into and your drive to self learn, how quick you can pick things up, and adaptability. You got this.

    2
  • Jump
    Confused about multiplying floating-point & integer values
  • That's fair, I was trying to be a bit vague since you're learning and wanted to help point you to the solution. Went a little too vague with it 🙂

    5
  • Jump
    Confused about multiplying floating-point & integer values
  • the signature for the input function (that's what it's called instead of command) is

    def input(__prompt: Any = ...) -> str
    

    which means it's always going to return a string.

    So it starts off as a string, then becomes whatever is typed in

    there's no real way for something to do that automatically without a much more robust setup.

    this snippet proves that

    test_int = input('enter integer:')
    print(type(test_int))
    test_float = input('enter float:')
    print(type(test_float))
    test_str = input('enter string:')
    print(type(test_str))
    
    >> <class 'str'>
    >> <class 'str'>
    >> <class 'str'>
    

    it is the responsibility of your program to validate and do whatever you want with the result, and part of that can include casting it to a different type.

    4
  • Jump
    Confused about multiplying floating-point & integer values
  • The traceback should give you an idea of what's going on, but you can test for yourself by checking the result of input:

    test = input('enter number:')
    print(type(test))
    

    Another question to ask is "why did you cast 'h' as a float?" And what happens if you just do h + r?

    12
  • Jump
    Need more positive masculinity. Like what you see? Ask about it and learn from them
  • picture of two guys kneeling in front of a wall

    Bullshit feely caption that doesn't make sense to any who understands the words being used

    Internet: omg, so wholesome!

    -1
  • Jump
    Need more positive masculinity. Like what you see? Ask about it and learn from them
  • That doesn't address the quality of hanging a TV. The things you mentioned are superficial. Being good at hanging a TV is structural. The only way one would know if another was good or bad at it is if the TV eventually fell off the wall or was loose, which one could not see from a FB post.

    -8
  • Jump
    Need more positive masculinity. Like what you see? Ask about it and learn from them
  • Bud, there's a term around men over explaining things because it's such a thing: mansplaining. There's also a real big trope in many relationships about men trying to solve problems instead of saying "wow that sucks". This behavior is so ubiquitous that it's in sitcoms and has been for as long as TV has existed.

    -4
  • Jump
    Should one say "too many refried beans", or "too much refried beans"?
  • Too much what? The point I was making was a singular plural unit, just like an amount of (singular) refried (plural) beans.

    Too many refried beans.

    1
  • Jump
    Need more positive masculinity. Like what you see? Ask about it and learn from them
  • That didn't involve you learning how someone can hang tvs better than you on Facebook. Having hung a TV or two in my day, I don't know how one can learn to respect another's ability there based on social media

    Quick edit: I'm also super annoyed at op to tie it to 'positive masculinity' while describing the quintessential male trait - they like teaching or displaying their abilities. Go grill or work on cars with a group of men and see what happens. It's a fucking trope. This nonsense wholesome schtick is gross.

    -16
  • Jump
    let's spell it together, kids, w-a-g-e t-h-e-f-t
  • Once we can assume the "common person" is well versed in post structuralism, we can have that chat. Until then, I'm good with a pragmatic approach to linguistics.

    13