CheckEmoji Community · the emoji forum
🏠 Home 🆕 What's new ❓ Unanswered 🔥 Popular 📡 RSS Members 👥 0 online log in · register
Home › Benjamin Brooks2 › Posts

Posts by Benjamin Brooks2

33 posts shown.

Word Comparison in IT Support ·
Michelle Bennett5 said:
Benjamin Brooks2 says:
I've never touched Python before, but I figure it would go something like this...

c=0
istaslova=""
sentence=input("Enter the first sentence: ")
sentence2=input("Enter the second sentence: ")
for i in range(len(sentence)):
for j in range(len(sentence2)):
for c1 in range(len(istaslova))
if sentence2.find(sentence)********* if it found the same letter in both words
if istaslova.NOTfind istaslova = istaslova + ......c=c+1****** if it DIDN'T find the letter in "istaslova" already, then add the letter

print("Duplicate letters:",istaslova)
print("Total count:",c)

It’s not gonna work like that. Check post #3; I already went over this there.
You need some kind of status matrix for every position in that first word—something to track what's been used up, right?

Fine, here's my first attempt at Python

Python C = 0
a = "Benjamin Brooks2"
b = "Michelle Bennett5"
common_chars = ""
for x in a:
- for y in b:
-- if x == y:
--- if x not in common_chars:
---- common_chars = common_chars + x
---- Python C = 0
print(c)

********************

I don't see any matrices here... maybe something else is going on at your event horizon, because I didn't even use "Used" 🤔

EDIT: Okay, I get what you mean about the dashes now
Word Comparison in IT Support ·
Michelle Bennett5 said:Just a heads up—if you follow the instructions (like with "apple" or "egg"), the answer should be 2. If you just comment that part out, you're gonna end up with 3.
You really need an array to track which letters from the first word have already been used, otherwise, there's no way to pull this off.

😁 You'd probably overcomplicate black holes and event horizons too, along with space curvature and gravity
Word Comparison in IT Support ·
Michelle Bennett5 said:Just a heads up—if you follow the instructions (like with "apple" or "egg"), the answer should be 2. If you just comment that part out, you're gonna end up with 3.
You really need an array to track which letters from the first word have already been used, otherwise, there's no way to pull this off.

Never touched Python before, but I guess it would look like this

c=0
istaslova=""
sentence=input("Enter the first sentence: ")
sentence2=input("Enter the second sentence: ")
for i in range(len(sentence)):
for j in range(len(sentence2)):
for c1 in range(len(istaslova))
if sentence2.find(sentence)********* if it found the same letter in both words
if istaslova.NOTfind istaslova = istaslova + ......c=c+1****** if it DIDN'T find the letter in "istaslova", then add it

print("Repeating letters:",istaslova)
print("Total count:",c)
Word Comparison in IT Support ·
Michelle Bennett5 said:
Michael Jackson10 says:
Python C = 0
istaslova=""
sentence=input("Enter first sentence: ")
sentence2=input("Enter second sentence: ")
for i in range(len(sentence)):
--if sentence2.find(sentence)>-1:
----if istaslova.find(sentence)==-1:
------istaslova=istaslova+sentence
------c=c+1

print("Repeating letters:",istaslova)
print("Total count:",c)

The catch is this thing counts spaces too, treating them just like any other character. You could probably just skip those when you're testing...

The prompt actually specifies a 'word,' so spaces shouldn't even be in the running.
Check the requirements—if you input something like "apple, butter," the result should be 2, but your code only gives you 1.

Indices start at 0. len is the letter count.
Word Comparison in IT Support ·
Michael Jackson10 said:a=10
print(a)

And then it just goes to hell.

First time looking at this syntax. I'd find the error if I could actually copy-paste.

So I hopped over to this https://www.onlinegdb.com/online_python_compiler

And now I can't figure out how to exit a for loop. Been searching for half an hour. Probably that break thing, just trying every combo.

I mashed two words together and now I'm stuck looking for the same letters.
Word Comparison in IT Support ·
Michelle Bennett5 said:anyway, can you try breaking this down in Python?
there's an online runner here https://www.w3schools.com/python/try...e=demo_default

makes it pretty easy to check if the logic holds up and see the results.
just run it against the examples from the assignment definition:
apple, egg = 2 (p, e)
apple, butter = 2 (a, e)
potato, bread = 3 (p, o, t)

That online runner is 🙂
Got any other one?

Just type a = 10
print(a)

And it actually works.
Extreme jealousy in Psychology & Therapy ·
Maybe there are other issues at play, but let's stick to the jealousy topic for now.

Not sure if this is allowed here https://www.amazon.com/shame-psychology-book/dp/B00005N5S2

A lot of major books in the field of popular psychology, which some of you might have read, frame shame as a purely destructive force. This book actually walks you through the entire spectrum of emotions tied to shame (things like discomfort, guilt, and insecurity from being overly self-conscious), which are just parts of daily life and aren't always toxic. It teaches you how to spot when we're talking about shame without even using the word. No matter how you react to it, everyone deals with these feelings every single day. Even if we don't realize it, we're constantly sensing the threat of shame in our interactions and trying to dodge it whenever possible.

That’s basically what psychotherapy aims to do—identify what's actually happening. But it's hard to figure out if someone is just refusing to speak because they're paralyzed by shame... and then of course, the doctor isn't going to work for free.
Word Comparison in IT Support ·
int c = 0;
string sentence = "Benjamin Brooks2";
string sentence2 = "coastaltiger39";
string istaslova = "";
char[] charArr = sentence.ToCharArray();
char[] charArr2 = sentence2.ToCharArray();
foreach (char ch in charArr)
{
if (sentence2.Contains(ch))
{
if (istaslova.Contains(ch)) { }
else { istaslova = istaslova + ch; ++c; }

}
}
Console.WriteLine(istaslova);
Console.WriteLine(c);

******************************************

// Looks good now. It shows the unique letters and the total count. --> ok,2
Word Comparison in IT Support ·
coastaltiger39 said:And honestly, I just need the count of duplicate letters, not actually knowing which ones they are.

int c = 0;
string sentence = "apple";
string sentence2 = "banana man";
char[] charArr = sentence.ToCharArray();
char[] charArr2 = sentence2.ToCharArray();
foreach (char ch in charArr)
{
foreach (char ch2 in charArr2)
{
if (ch == ch2) { ++c; }

}
}
Console.WriteLine(c);

This spits out 10. Figure it out yourself.😁
Extreme jealousy in Psychology & Therapy ·
northernbadger7 said:I’ve been in a relationship with someone just like you, OP. It was an experience I swore I would never go through again. Don't let him reach a breaking point where he makes that same vow. Either seek professional help or walk away—do it for his own sake. Personally, I'm leaning toward the latter because I'm not sure there's any other way out. I honestly don't believe even the best therapists could fix this kind of situation.

This should have been handled from the jump, but everyone starts from a different place. Take Obsessive-Compulsive Disorder for example.

A quick search online turned up this:

Obsessions are mental events involving intrusive thoughts, feelings, or ideas, while compulsions involve behaviors where repetitive actions—like counting, checking, or avoiding—feel impossible to control. With OCD, a person might deal with obsessions, compulsions, or both at the same time.

Here's the link: https://www.mayoclinic.org/diseases-conditions/obsessive-compulsive-disorder/symptoms-causes/doc-20355924

Books could have solved this, but they aren't exactly light reading. You need a megaphone for this one.
Laptop stuck during new OS installation in IT Support ·
Not sure why you don't have 32-bit, since you've got 3 GB 🙂

You need 64-bit to go over 4GB. It might be lagging because you don't have at least 4GB, which is basically the bare minimum for 64-bit. Even my desktop feels sluggish with 4GB on Windows 7 64-bit.

Plus, if you're on a laptop, the integrated graphics will eat up a few gigs too. Haha. That's just not enough for 64-bit.
Laptop stuck during new OS installation in IT Support ·
Who knows, maybe they don't know English well enough to understand what "First boot device" actually means. It caught my eye too. It says "press any key for...", but you shouldn't press anything. Just wait a few seconds.
Laptop stuck during new OS installation in IT Support ·
Robert Fox78 said:And that’s where things fall apart—everything runs smooth and steady until it hits "Finalizing your setup." It just hangs there. Won't finish. I waited all night and nothing... absolutely nothing. So, I try installing a standard Windows XP Professional sp3, probably the 64-bit version, and everything seems fine at first. It writes the system to the drive, then—boom—black screen. It loops back to "press any key for..." and still won't finalize the install.

The "press any key for... boot CD/DVD" thing happens after the reboot?

If you've got multiple hard drives, the BIOS might be set to a specific one. You install to a different drive, it tries to reboot, and then can't find the right one. I’ve had a drive before that could read and write just fine, but the boot sector was trashed, making an OS install impossible.

I'd check the boot order in the BIOS first. If you're installing an OS, you start with the CD/DVD, then after the reboot, go into the BIOS and switch the priority from the CD/DVD to the HDD.

Still doesn't explain how the installation actually went down. Did you format everything? New partitions???

I knew it. I tried wiping all the partitions and recreating them, but no luck. Then I'd run the XP installer just to make the partitions, kill it, then try installing Windows 7 onto those XP partitions instead. Spent hours cycling through every possible combination.

There's also Ubuntu live CD. Boot from that, or try installing 🤔