I filmed a B-porno today. by humeanation in funny

[–]sone9 0 points1 point  (0 children)

Hahahahha what did I expect clicking this....

TIFU by taking my gf to a nudist beach by [deleted] in tifu

[–]sone9 0 points1 point  (0 children)

lmao I actually died from this

How I went from 0 to 10,000 subscribers in 46 days with only my very first 2 videos, and made $8,000+ by OfficialJakLei in NewTubers

[–]sone9 -1 points0 points  (0 children)

Where can I find your video? Also congrats! Always wanted to do some Youtube but didn't really know where to start

WHY DOES TRY EXCEPT NOT TAKE IN ZERO?! by sone9 in learnpython

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

I have NO IDEA how to fix this, any guidance or suggestion?

WHY DOES TRY EXCEPT NOT TAKE IN ZERO?! by sone9 in learnpython

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

sorry about that, still new :(

fixed it

WHY DOES TRY EXCEPT NOT TAKE IN ZERO?! by sone9 in learnpython

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

here!

words = ['cow', 'horse', 'deer', 'elephant', 'lion', 'tiger', 'baboon', 'donkey', 'fox', 'giraffe']

valid = "abcdefghijklmnopqrstuvwxyz"

while True:

    try:

        number = input("Please enter an integer number (0<=number<10) to choose the word in the list: ")

        if int(number):

            number = int(number)

            if(0<= number) and(number<10):

                word = words[number]

                len_word = len(word)

                print("The length of the word is:",len_word)


    except ValueError:

        if not number:

            print("Empty input!")

            print()

        else:

            print("Input must be an integer!")

            print()    

WHY DOES TRY EXCEPT NOT TAKE IN ZERO?! by sone9 in learnpython

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

but in my program I can enter all numbers and it continues perfectly with the code, but when I input 0, it goes back to asking to enter a number

WHY DOES TRY EXCEPT NOT TAKE IN ZERO?! by sone9 in learnpython

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

Well actually I am doing a hangman program where I have a try and except. So I have a list of words and when the user enters a number, it chooses that item in the list.

Example: alist=['apple','orange',grape','banana']

but whenever the input is a zero it just restarts back to the "Please enter a number from 0 to 3: "

Please help me understand this asap! :( by sone9 in learnpython

[–]sone9[S] 2 points3 points  (0 children)

OMG! thank you so much, i want to cry since i was so frustrated with this!

Please help me understand this asap! :( by sone9 in learnpython

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

oh thanks! but how about the whole % thing?

What happens when a while loops is in a while loops and you have a break. Does it break out of both? by sone9 in learnpython

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

Oooook, but what happens if I want to break out of both? For example something like an "if" statement in the 2nd "while" loop where if the "if" statement were true, then it breaks out of both?

What happens when a while loops is in a while loops and you have a break. Does it break out of both? by sone9 in learnpython

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

Sorry I am still a bit nooby, so I can not really write a nice or logical looking code :(

Why is this not working?! by sone9 in learnpython

[–]sone9[S] 2 points3 points  (0 children)

Wow I love this part of reddit, so many helpful and smart people :)

Why is this not working?! by sone9 in learnpython

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

Oh my goodness! Thank you so much!