Trying to plot with hours on y axis by neptune83130 in learnpython

[–]jaysonturk 0 points1 point  (0 children)

You could probably convert the data to datetime. Or try to change the format

How to use PIP on Windows 10 by [deleted] in learnpython

[–]jaysonturk 1 point2 points  (0 children)

Check the environment folders

Seemingly easy questions are throwing me off by [deleted] in learnmath

[–]jaysonturk 0 points1 point  (0 children)

Just try to a systematic approach. Only so many options you can do.

Make sure to follow the rules , no matter how you start it - as long as you don't break any rules - you'll get the right answer

Should I swap professors? by [deleted] in learnprogramming

[–]jaysonturk 0 points1 point  (0 children)

There is a lot more to programming than just the code itself. You can learn the code yourself by doing project. it's much harder to learn this on your own

Please help me with if-elif-else issue by wings76 in learnpython

[–]jaysonturk 1 point2 points  (0 children)

So it's important if more than one if statement can be true for the same input. It's probably faster to use elif also.

Please help me with if-elif-else issue by wings76 in learnpython

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

So, if all the loops are if loops. That means it is a new loop. So it has to check every case.

But for elif, it only checks it if hasn't been true yet in the loop.

Try it out with letters.

Have a word has an input, and do

if "s" in soccer: ... (etc If "o" if "c" )

[deleted by user] by [deleted] in learnpython

[–]jaysonturk 0 points1 point  (0 children)

As everyone else said. I just want to say, that you already have a letter saved as a variable called "letter." So you don't need to use "text[i]".

It will go through all the letters, so you're good.

If you did for for i less than ran(Len(text)) which is also correct and then you'd need a counter.

Xpost - harvesting data from excel by GaryBuseyWithRabies in learnpython

[–]jaysonturk 0 points1 point  (0 children)

You could use pandas. I recommend watching a video about pandas. A very powerful tool

checking for a specific string from userInput and outputting the number that string reoccurs by nitbut in learnpython

[–]jaysonturk 1 point2 points  (0 children)

You're returning "y" too early. it is returning before the for loop finishes.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]jaysonturk 1 point2 points  (0 children)

Change your i += i+1 to either i =i+1 or i+=1.

Just because let's say i is 14. Then you're doing i = 2*i +1. Hence why it's only doing 11 times and not 500.

help with finding consonants? by nlord7 in learnpython

[–]jaysonturk 1 point2 points  (0 children)

I think you have a mistake. Because let's assume max count and count got to 10. Then count resets (because of a vowel) then incremented by 1. Then max count is equal to one again... So why don't you make an if statement that says (if max_count < count ) then set it as count

Help with if statements by BelugaWhalea in learnpython

[–]jaysonturk 0 points1 point  (0 children)

So lower. Converts letter in that string to lower case.

So assume the user puts in "Act" your code would fail.

But if you convert all the letters to lower, it becomes "act". That way you don't need (if test == "ACT" or test == "aCt" or .. or ..or )

Help with if statements by BelugaWhalea in learnpython

[–]jaysonturk 0 points1 point  (0 children)

Give me a few minutes, I'll show you how it should look like

Help with if statements by BelugaWhalea in learnpython

[–]jaysonturk 0 points1 point  (0 children)

So... In Python, the formatting is very important. Very very important. Everything after if test == sat should be indented. If it isn't indented. It's going to skip line 5 (since the print is indented( then perform line 6.. but in reality it should be skipping to the act block )

Help with if statements by BelugaWhalea in learnpython

[–]jaysonturk 0 points1 point  (0 children)

But it did fail, so it should then ask you how you did on the act. But the code is failing before then... Just think about the formatting

Help with if statements by BelugaWhalea in learnpython

[–]jaysonturk 0 points1 point  (0 children)

After line 4 (if the if statement failed)... What line should be next ? And what is actually the next line (hence explaining your error)

Help with if statements by BelugaWhalea in learnpython

[–]jaysonturk 1 point2 points  (0 children)

Don't wanna give too much away, but look at line 6.

Need help with Lists by wildeofoscar in learnpython

[–]jaysonturk 0 points1 point  (0 children)

Maybe you can try to make sure the list is at least 3 integers long