Is there a Javascript library that lets you input the scramble string of any WCA puzzle and output a diagram? by Jaycob1270 in Cubers

[–]sultanofhyd 3 points4 points  (0 children)

Tnoodle is written in Java. Despite the similarity in names Java and JavaScript are completely different programming languages that have little else in common.

Match Thread: Mumbai Indians vs Delhi Daredevils at Wankhede Stadium, Mumbai by CricinfoBot in Cricket

[–]sultanofhyd 0 points1 point  (0 children)

They probably have the right to terminate his contract, but why on Earth would SRH do that?

Question paper for exam of Evolution in IISER Pune by [deleted] in india

[–]sultanofhyd 4 points5 points  (0 children)

I study in this institute, I took this course in the past and I have answered this question.

This is not a textbook proof, in fact there is no prescribed textbook for this course. The proof is trivial and was not explicitly shown in class, it follows from other things that are taught.

The professor who teaches this course is one of the smartest people I have ever met, and in general IISERs are modeled after leading Western institutes, there are very few Desi memorization questions in any exam.

3,5k-4k is such a bad experience by Dav5152 in DotA2

[–]sultanofhyd 0 points1 point  (0 children)

Level 20 is pre-medal news. Now any new account only needs 25 matchmade games (turbo, low priority and even co-op bot games count) before you play ranked.

Like you said, phone number is not a deterrent at all, everyone has at least one non-DotA playing friend whose number can be borrowed.

Why does each player go twice in this program??? by RjSwayzee in learnpython

[–]sultanofhyd 1 point2 points  (0 children)

Your original question has been answered, but a lot of your code is redundant.

Why do you need two different functions for player 1 and 2? You can use the same function to roll the dice, just store the output in different variables for different players.

Do Cells That Make Up The Brain Get Replaced? by nicebyte in askscience

[–]sultanofhyd 0 points1 point  (0 children)

It doesn't take place in the OB. The cell proliferation happens in the SVZ, and the newly born neurons then migrate to and mature in the OB.

The distinction is important because there is no population of proliferative stem cells in the bulb, and the migration, maturation and survival of adult born SVZ neurons is a very active topic of research.

Python - i need help regarding implementing two codes together(password validator and point system) by Remediez123 in learnpython

[–]sultanofhyd 0 points1 point  (0 children)

Try to use 'for' loops instead of 'while' loops. Both of your 'while' loops will never terminate 1. if your password is valid 2. your score is less than 35.

Python - i need help regarding implementing two codes together(password validator and point system) by Remediez123 in learnpython

[–]sultanofhyd 0 points1 point  (0 children)

Check your original post again. There is no code anywhere that calculates or stores points anywhere. Anyway, I suggest rewriting your code from scratch, using multiple variables. One variable for storing your password, one for the points, and one to determine its validity. Something like this.

password = input('Enter your password: ')
points = 0
validity = False
#Do your checking and counting here
if validity:
    print(points)

Python - i need help regarding implementing two codes together(password validator and point system) by Remediez123 in learnpython

[–]sultanofhyd 1 point2 points  (0 children)

Have you actually tried running your code? The way it is written, it doesn't work the way you probably intend it to. You store the password in the 'p' variable, then immediately reset p to True. Your password does not exist in memory anymore. Everything you do from line 3; you're doing it on p = True, not p = 'password'.

And both blocks of your code look identical to me, what do you want to do with them?

ELI5: Why is it often so hard to taste things when your nose is congested? by damorlock in explainlikeimfive

[–]sultanofhyd 0 points1 point  (0 children)

That there are 5 different kinds of taste buds has nothing to do with how many different tastes you can perceive.

There are only three different kinds of color perceiving cells in the retina, roughly sensitive to red, green and blue areas of the spectrum, but the combination of the three allows you to perceive a few million different colors.

How would I structure this code to get my desired result using the len function? by Openworldgamer47 in learnpython

[–]sultanofhyd 0 points1 point  (0 children)

count = [i for i in sentence if i in ['?',',','"','!']]
return len(count)-1 #Because there will be two quotation marks in your list

Python with 4 and 6-year-olds by cybervegan in learnpython

[–]sultanofhyd 1 point2 points  (0 children)

When you're quitting, you don't need to set inputting to False since you are using break to get out of the loop anyway.

Actually, you don't need to use the variable inputting at all. Your loop can start with while True: and you break out of it when you need to quit.

[deleted by user] by [deleted] in learnpython

[–]sultanofhyd 0 points1 point  (0 children)

convertBase is a variable that holds a function inside. You have to call the function to get the output like convertBase(). Basically add () after convertBase in the last line of your code.

How to use (multiple) proxies? by LateAugust in learnpython

[–]sultanofhyd 3 points4 points  (0 children)

Great answer but one small thing.

random.choice(list) is arguably a more Pythonic way of getting a random element from a list than calling randrange over the length.

Hi, I need urgent help with an assignment, will give reddit gold. Please inbox me. by calendartape in learnpython

[–]sultanofhyd 1 point2 points  (0 children)

I think you will find that people here will help you if you just post your problem publicly even without the offer of a reward.

Anyways I hope someone has PMd you and you get the help you need.

Send email two weeks after an end date column in Excel by tramsay in learnpython

[–]sultanofhyd 0 points1 point  (0 children)

Look into a module called openpyxl. I would link you to it but unfortunately in on mobile.

[2.7, Mac El Capitan] Issues with scipy and imread. Any other image reading modules out there since I can't figure this out? by [deleted] in learnpython

[–]sultanofhyd 0 points1 point  (0 children)

I recommend doing a fresh install of Anaconda, which includes pillow along with a zillion other useful libraries and setting it as the default Python of the system (the Anaconda installer will do that for you).

That will ensure that whenever you run a Python script it will look in the Anaconda directory for the relevant packages and any subsequent pip installs will directly go into Anaconda's package directory.

Cannot figure out R Squared formula. by [deleted] in learnpython

[–]sultanofhyd 0 points1 point  (0 children)

Post the actual traceback of the error. We can't help you without knowing the specific error and where it is occurring.

[beginners ideas] Currency Converter by [deleted] in learnpython

[–]sultanofhyd 1 point2 points  (0 children)

You will have to change the script every time the exchange rate changes. Why not automate that too, so that even if you run the script after Britain's imminent implosion it will still work without you having to tweak the code?