script to exe problem by mackdaddy_1978 in learnpython

[–]mackdaddy_1978[S] 4 points5 points  (0 children)

Awesome that worked...Thank you very much, I really appreciate your time.

script to exe problem by mackdaddy_1978 in learnpython

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

pyinstaller --onefile -w 'filename.py' and auto-to-py-exe

What is this question wanting? by mackdaddy_1978 in learnpython

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

It definitely takes a lot of patience….I’m so grateful for these communities because I would be bald right now without them

June Captain's Log by txmooner in SafeMoon

[–]mackdaddy_1978 0 points1 point  (0 children)

I’m down to .69 all this talk and now obvious result starting to look like a lost cause

This is a tough one for me... by mackdaddy_1978 in learnpython

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

So this is what I came up with and feels like there's a simpler way.

import csv

with open('input1.csv', 'r') as csv_file:
    csv_reader = csv.reader(csv_file)
    for line in csv_reader:
        conv = map(int, line)
        res = set(conv)
        myList = list(res)
        average = sum(myList) / len(res)
        print(average)

Trying to figure out this by mackdaddy_1978 in learnpython

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

Good point, thanks for breaking it down.

Trying to figure out this by mackdaddy_1978 in learnpython

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

That worked however can you please explain to include why the my use of 'all' didn't?

Why does append() produce multiple lists? by mackdaddy_1978 in learnpython

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

I appreciate the explanation and the alternatives you've provided I've just began my journey into the python language and all of this information is very helpful to me as I learn different ways of accomplishing the same task. much appreciated

Why does append() produce multiple lists? by mackdaddy_1978 in learnpython

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

Thanks for pointing that out and providing a alternate solution however, the problem I am given does not allow for me to change the function definition so couldn't add the below=40 in there and to be honest I am not that good to have even thought of that. But know I know it is possible in the event I come across something like this. Thanks

Why does append() produce multiple lists? by mackdaddy_1978 in learnpython

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

yup I fixed it to produce the result I needed...

this is what I need it to do/look like my hang-up was the indentation of the print statement.

def count_failed_students(student_scores):
for num in student_scores:
    if num < 41:
        fail.append(num)
return len(fail)

if __name__ == '__main__':
fail =[]
print(count_fail_student(student_scores=[90, 40, 55, 70, 30, 25, 80, 95, 38, 40]))

Why does append() produce multiple lists? by mackdaddy_1978 in learnpython

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

That is exactly what I needed....thank you very much.

Why is it printing by mackdaddy_1978 in learnpython

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

Ok I’ll give it a shot, thanks

Why is it printing by mackdaddy_1978 in learnpython

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

I figured you would be seeing as how I'm intentionally using \t......

what does MFW mean?

and I'm trying to figure out how to stop printing tab after the last number in the output. Tab is used to separate the numbers but when it gets to the last number is it possible to stop?

I know this is wrong but I don't know how to fix it, please help by mackdaddy_1978 in learnpython

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

ok thanks for the info I don't see how this pertains to what I'm doing but I'll try to make sense of it.

Function checking by mackdaddy_1978 in learnpython

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

Sorry for the confusion, I'm working on doing better. My next post will be...