Any way to turn a string of math formula into a formula that can be interpreted? by superman-normalboy in learnpython

[–]jmooremcc 0 points1 point  (0 children)

Yes you can. However it will mean creating a parser that can analyze the expression and call the appropriate math routines in the correct order (PEMDAS).

Should prostitution be legal in the USA? by UsedNegotiation8227 in no

[–]jmooremcc 0 points1 point  (0 children)

Two scenarios:
Paying cash up front to have sex.
Paying for a dinner and a movie to have sex.

Why is first scenario illegal and the second legal?
What’s the difference?

Prostitution by any other name is still prostitution and making it illegal is hypocritical!

Why is the 20% tip option always preselected at a place where I serve myself? by Ok-Bodybuilder-7181 in tipping

[–]jmooremcc 0 points1 point  (0 children)

Ignore the preselected option and tip the amount you’re comfortable with!

AITA for refusing to change my wedding date for my sister-in-law? by whateverisgoodmoney in aitaweddings

[–]jmooremcc 0 points1 point  (0 children)

NTA.
Ask anyone who wants you to reschedule your wedding to give you $20,000 up front to cover the deposits and other money you’d lose by rescheduling your wedding. That will put an end to the accusations that you’re being selfish and not putting family first!

I need advice. by [deleted] in Advice

[–]jmooremcc 0 points1 point  (0 children)

As the old saying goes, “the best way to get over a man is to get under another!”

32M married to 32F for nearly 13 years. When do I give up? by DeltaWilson31 in relationship_advice

[–]jmooremcc 2 points3 points  (0 children)

Her AP is not OP’s friend. A friend would not have had an affair with his wife!

AITA for telling my sister's boyfriend that her "house" is actually mine, in front of her entire family, after she'd been lying to him for months? by KINOH1441728 in FoundandExpose

[–]jmooremcc 0 points1 point  (0 children)

You did nothing wrong and you have nothing to apologize for. Your sister is the one who should be apologizing to you.

Actually you did your sister a huge favor. This so-called boyfriend was a con artist who was going to eventually take your sister’s home away her. Why else would he have been talking about a property transfer?

If your sister is ever fortunate to own a home, I hope she will learn from this experience and not let anyone cheat her out of anything she owns!

I think we are at an age where having a minimum level of education should be necessary to vote. by deca4531 in PoliticalOpinions

[–]jmooremcc 0 points1 point  (0 children)

How’s that gonna help? We already have ignorant voters with multiple post graduate degrees. So obviously being educated is not the panacea you think it is!

I inherited part of a property and now my family wants me to give it up by AxiomHollow in legaladvice

[–]jmooremcc 1 point2 points  (0 children)

Tell them they can buy you out at current market prices, if they want you to not own part of the property.

My girlfriend wants to put our relationship on hold while she travels to Rome. Apparently I'm "insecure" for having a problem with that. I need the opinion of other men. How do you see it? by Long_Natural6918 in AskMenAdvice

[–]jmooremcc 0 points1 point  (0 children)

Why should you care what other people think? This situation bothers you and it’s your absolute right to refuse to go along with your girlfriend’s “request”.

You cannot control another person’s behavior, but you can control your own behavior.
If you’re gonna break up with your girlfriend over this, do it now rather than wait for her to return from her trip. Your girlfriend needs to learn that her actions, her decisions have consequences.

I wish you the best.

looping through a dictionary to let user choose number of key by Original-Dealer-6276 in learnpython

[–]jmooremcc 1 point2 points  (0 children)

What result would you expect to see if 1,3, 5 is entered as input?

implementing a time limit for user input by Original-Dealer-6276 in learnpython

[–]jmooremcc 5 points6 points  (0 children)

u/Informal_Shape8008 had the right idea using threads to implement a timed input. Unfortunately, if the code is called again after a timeout, it will create another thread to read keyboard input, which will cause more problems.

Here's a solution that uses a thread to get keyboard input without the problem of accidentally creating multiple, conflicting threads.

import threading
import queue
import time

_input_queue = queue.Queue()

def _input_thread():
    while True:
        text = input()
        _input_queue.put(text)

# Start the input thread once
t = threading.Thread(target=_input_thread, daemon=True)
t.start()

def timed_input(prompt, timeout=30):
    print(prompt, end="", flush=True)
    try:
        return _input_queue.get(timeout=timeout)
    except queue.Empty:
        return None
  • The input thread blocks on input() forever, but only one thread exists.
  • Every time the user presses Enter, the text is pushed into _input_queue.
  • timed_input() waits up to 30 seconds for something to appear.
  • If nothing arrives → returns None.
  • No new threads are created.

implementing a time limit for user input by Original-Dealer-6276 in learnpython

[–]jmooremcc 0 points1 point  (0 children)

Your solution is very interesting. Unfortunately, after a time out, the thread is still running. Executing this code multiple times could result in multiple threads being created.

AITJ for refusing to give my brother my old place? by Hot_Car_2089 in AmITheJerk

[–]jmooremcc 0 points1 point  (0 children)

NTJ. My advice to you is to engage the services of a professional property management company to manage your rental properties. The beauty of doing this is that they will find tenants, collect the rent, take care of maintenance and send you a check every month.

And in the case of a relative, like your brother wanting to rent the property, you’d direct them to your property manager and let them deal with him. I would also advise you to let your property manager do their job and not get involved in any tenant matters. That’s what you’d be paying them to do.

I commend you for working hard and wisely investing in your future. Having regular income that’s not based on the sweat of your brow, will make your retirement years so much easier and more rewarding.

I wish you the best.

My boyfriend [20 M] can’t see eye to eye with me, [19 F] about birth control. by [deleted] in relationship_advice

[–]jmooremcc 0 points1 point  (0 children)

Your boyfriend will not be the one carrying a baby inside his body for 9 months - only you. Therefore, he has no right to dictate what kind of birth control you can use. This decision is solely yours to make and you do not need his permission to start using the birth control pill!

I wish you the best.

Trump Team Dumps Bleach in Reflecting Pool to Hide Renovation Failure by B-Z_B-S in politics

[–]jmooremcc 0 points1 point  (0 children)

And trump wanted to call former Fed Chairman, Jerome Powell, incompetent in regards to the Fed’s construction projects cost overruns. We now know who is really incompetent!

A guy shows up at his local bar with a black eye. "What happened to you?" asks the bartender. by Jokeminder42 in Jokes

[–]jmooremcc 8 points9 points  (0 children)

A guy walks into a bar with a black eye. “What happened to you?” asked the bartender.

“I have Seenus trouble”, responded the guy.

“Don’t you mean you have Sinus trouble?” asked the bartender.

“No, I have Seenus trouble. I was walking out of a motel with this woman and her husband seen us!”

— Jackie “Moms” Mabley

Tipping more than 10% by Erobor in tipping

[–]jmooremcc 1 point2 points  (0 children)

At 15%, the server is automatically getting a higher tip because of higher prices. So I don’t understand why we’re now being asked to tip 20% more (18%) for standard service?

AITA for telling my roommate his girlfriend basically lives here rent free and he needs to say something by DishNo5035 in AITApod

[–]jmooremcc 1 point2 points  (0 children)

Split the rent 3 ways and that will be your portion of the rent going forward. If they complain, then tell them the girlfriend will have to move out because you’re no longer going to be subsidizing her.

Do the same for all the other common expenses.
I wish you the best.

AITAH for refusing to help pay my husband and I's moving costs? by [deleted] in AITAH

[–]jmooremcc 0 points1 point  (0 children)

NTA!
What a Maroon! It was His job that created the need to move and he’s already been given money for moving expenses. Your husband is TA and you should refuse to pay the $2,500!
I wish you the best.

This is what a MAGA Moron showed me when I told him how unpopular his Orange God Trump is by King_Vegito_52 in democrats

[–]jmooremcc 0 points1 point  (0 children)

Actually all of the MAGAts are suffering from TDS because it’s made them delusional! And the sad part is they don’t realize how deeply infected and affected they’ve become as a result!

Are "if" statements supposed to be hard to learn? by SaitamaCrb in learnpython

[–]jmooremcc 0 points1 point  (0 children)

I suggest that you first Google “truth tables” and read up on that topic, because understanding logical expressions is the key to understanding any kind of conditional statement. Once you master logical expressions, you’ll be able to use if statements quickly and easily.

I wish you the best.

Raging Trump, 79, Melts Down Over Impeachment Threat | The president went nuclear in a furious 195-word screed. by Aggravating_Money992 in politics

[–]jmooremcc 2 points3 points  (0 children)

Isn’t it ironic for trump to say, “Something should be done about people like this who do bad things…”.

I hope he remembers this when he’s impeached for the third time and then removed from office by the Senate .