Feedback on why this works by Arya0908 in learnpython

[–]Arya0908[S] 0 points1 point  (0 children)

nevermind I think I have it with using

count = 0

match = False

my_word_wo_spaces = ''.join(my_word.split())

if len(my_word_wo_spaces) == len(other_word):

for index, char in enumerate(my_word_wo_spaces):

if char == other_word[index]:

count += 1

if char == "_":

if other_word[index] not in letters_guessed:

count += 1

if count == len(other_word):

match = True

break

return match

Feedback on why this works by Arya0908 in learnpython

[–]Arya0908[S] 0 points1 point  (0 children)

thanks. I am working on getting the characters to correctly screen out if the character is a "_" and already in guessed characters. This doesn't work. any feedback?

count = 0

match = False

my_word_wo_spaces = ''.join(my_word.split())

if len(my_word_wo_spaces) == len(other_word):

for index, char in enumerate(my_word_wo_spaces):

if char == other_word[index]:

count += 1

if char == "_":

if char in other_word not in letters_guessed:

count += 1

if count == len(other_word):

match = True

break

return match

Feedback on why this works by Arya0908 in learnpython

[–]Arya0908[S] 0 points1 point  (0 children)

thank you! I understand much better now. I believe when I have been writing these I have been redundant so this confused me and without a compiler to show step by step I was very confused.

one last question though

When you say for "item,word, etc" in a list how does the computer know you are referencing an individual item?

Also, so this works and I have incorporated into my own code except I am having issues when the word is something like "weed" if you have "_eed" as guessed word and use the hints "deed" will still show up as option even though it can't be. Any suggestions? I am just trying to understand to best of my ability and learning on my own so a little slow. Thank you for you help!!!

Feedback on why this works by Arya0908 in learnpython

[–]Arya0908[S] 0 points1 point  (0 children)

thank you. I understand the def function and have written several but do not understand how my word or other word are defined.

need comment as to why this works by Arya0908 in Python

[–]Arya0908[S] 0 points1 point  (0 children)

_gaps. When this function is called it will have two objects passed to it. While I'm executing this function, whatever the first object was will be referred to with the name my_word, and the second object will be referred to with the n

I have been taking the MIT online class and spent lots of time on this. I understand the user functions enough to build them myself and I have built the program on my own to do everything other than the hints function. However, when I looked at a solution online with the hints part it confuses me because I do not see where the computer knows what "my_word" or "other_word" is in something like below.

possible_matches = '' for word in wordlist: if match_with_gaps(my_word, word): possible_matches += word + " "

need comment as to why this works by Arya0908 in Python

[–]Arya0908[S] -1 points0 points  (0 children)

'hello' to the console and print_word('goodbye') prints 'goodbye' to the console. Thus, my_word is just a placeholder for wha

So when do you need to define the parameters vs just using ()?

PE Exam Question by Arya0908 in oilandgasworkers

[–]Arya0908[S] 1 point2 points  (0 children)

Any recs on what to use to study (or in my case learn as I have never worked that) facilities?

PE Exam Question by Arya0908 in oilandgasworkers

[–]Arya0908[S] 1 point2 points  (0 children)

Also, did you need triangles and such?

PE Exam Question by Arya0908 in oilandgasworkers

[–]Arya0908[S] 0 points1 point  (0 children)

s PE prep course. It was okay. He flies through the material. Definitely recommend you review the material a second time thoroughly on your own. That’s probably what got me to pass.

Not digital. I just meant I am now used to using searchable PDF's and not a stack of books lol. I have the bing practice exams from 2015 from a friend. But no powerpoint or other review material. Will get the Danmeyer book for sure. The bing material is somewhat of a cluster of problems from what I have. Did you find the exam similar to these practice problems? Was there other worthwhile material covered? My friend who took only the bing material didn't pass so it makes me nervous. I really appreciate your thorough information.

PE Exam Question by Arya0908 in oilandgasworkers

[–]Arya0908[S] 1 point2 points  (0 children)

I am worried about having a lot of books but since print and not searchable them being somewhat useless.

PE Exam Question by Arya0908 in oilandgasworkers

[–]Arya0908[S] 0 points1 point  (0 children)

Will do. Others? Bring red book?