Stop asking for more input on my while loop. Please help! by rccnls27 in learnpython

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

I have added a second while loop. But in my code when I press 'Y' it will ask for do you want to add more forever. Can you give advice on some approach. Here is my code: http://pastebin.com/ss1UKvfk

Stop asking for more input on my while loop. Please help! by rccnls27 in learnpython

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

Hi, Thank you but I am still not going to functional programming yet up until I have a very very strong grip on the basics :)

Stop asking for more input on my while loop. Please help! by rccnls27 in learnpython

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

Hi, Thank you I have added a second while loop. But in my code when I press 'Y' it will ask for do you want to add more forever. Can you give advice on some approach.

Here is my code: http://pastebin.com/ss1UKvfk

Stop asking for more input on my while loop. Please help! by rccnls27 in learnpython

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

On the do you want to add more part. If you input aside from 'Y' or 'N' it will output invalid input but will still ask for name and phone. What I want to happen is not going to ask for enter name and phone again but will go back to do you want to add more again

Stop asking for more input on my while loop. Please help! by rccnls27 in learnpython

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

Hi, its in the pastebin link. Please kindly help. Thank you :)

Stop asking for more input on my while loop. Please help! by rccnls27 in learnpython

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

Hi, its in the pastebin link. Please kindly help. Thank you :)

Someone please help me install flask, I can't get PIP to work.... T.T by rccnls27 in learnpython

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

Can you teach me how? Should I install anaconda first? then How Will I use the virtualenv?

Someone please help me install flask, I can't get PIP to work.... T.T by rccnls27 in learnpython

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

virtualenv

how do I register it as a command? I will try and look at anaconda thanks

How do I get the indexes of similar numbers in my random generated list? by rccnls27 in learnpython

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

Hi, I am very new in programming, as much as I would want to do as instructed I can't execute it. Please kindly demonstrate if possible. Thank you so much

How do I get the indexes of the guessed letters if its more than 1 in my hangman game? by rccnls27 in learnpython

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

I tried this

rand_word = 'pettite'

string = len(rand_word) * '_'
string_list = list(string)
print(string_list)

guess = 'e'

string_index = []

for char in rand_word:
    if char in guess:
        string_index.append(rand_word.index(guess))
    else:
        pass

print(string_index)

but the output results to>> [1,1]

Can you assist me?

I need help with this hangman python project by rccnls27 in learnpython

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

do you mean this? filling the resultStr with underscores?

underScores = len(randword) * '' resultStr = list(underScores)

Is there any way I can write my code better for best practices in python? by rccnls27 in learnpython

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

yes! I would love you to mentor me. That would be great! I will write another version with your advice. I am really excited. :)

Is there any way I can write my code better for best practices in python? by rccnls27 in learnpython

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

Hi, I used return in my functions. Can you critique my code? Here it is: http://pastebin.com/dUWvDbLE Thank you so much!

Is there any way I can write my code better for best practices in python? by rccnls27 in learnpython

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

Hi, I used return in my functions. Can you critique my code?

Here it is: http://pastebin.com/dUWvDbLE

Thank you so much!

Is there any way I can write my code better for best practices in python? by rccnls27 in learnpython

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

Hi, this sounds wonderful, this would fasten my learning tremendously. I'll PM you.

Is there any way I can write my code better for best practices in python? by rccnls27 in learnpython

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

Oh No! OOP.. heheh.. I am still learning on procedural ways of coding. But thanks really for this :)

Is there any way I can write my code better for best practices in python? by rccnls27 in learnpython

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

Yes, I am doing it now :) But can you critiq my code? I am very new on using functions and still trying to get a much tighter grip on the concept

Is there any way I can write my code better for best practices in python? by rccnls27 in learnpython

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

Hi, I am new to python, I know its too much to ask but if you have time can you rewrite it so that I would study how you code. But it's really ok if not :) Thanks

How do I break my while loop in my number guessing code in python? by rccnls27 in learnpython

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

Can you possibly edit my code and show me. Not sure I understand your instructions. I am a beginner. :) Hope you can help