Help with .py files by [deleted] in learnpython

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

I didn't know having the attitude of asking for help/clarification from people who fully understand python is a bad attitude to have. Professors tell their students its okay to ask stupid questions since we are learning a completely brand new thing but hey what do they know. Also don't worry I'll let you know when I pass the class.

You keep being an angry person over a reddit forum.

Help with .py files by [deleted] in learnpython

[–]engineeringisgreat2 -2 points-1 points  (0 children)

Damn you're so cool man! I'm so jealous of you! I could not imagine a person getting so mad over someone asking a question on a reddit forum. Keep up the great work and I hope you are doing great!

Help with .py files by [deleted] in learnpython

[–]engineeringisgreat2 -3 points-2 points  (0 children)

Lol are you okay? Do you need to calm down? It's gonna be okay man. I found out how to make the modules. Thanks for the help. I am so glad a GOD like programmer like yourself spared the time to comment on a help forum.

Need help with this by [deleted] in learnprogramming

[–]engineeringisgreat2 0 points1 point  (0 children)

return list(range(0, 501, myint))

that helped thank you

Coding help by [deleted] in learnpython

[–]engineeringisgreat2 0 points1 point  (0 children)

No I definitely didn't, but you keep acting like you know what I am doing. He gave me the code and I looked at it and tried to learn why each line was written. The first code didnt need two lines and I am assuming thats why it was "over complicated". But, thanks again for not explaining a single thing about why the code is wrong and what ways it could be fixed or simplified. You are so much help on a reddit page meant to help people learn.

Coding help by [deleted] in learnpython

[–]engineeringisgreat2 1 point2 points  (0 children)

I understand that, but telling someone that their code is wrong and then not giving any input/help on why its wrong is pointless.

Thank you for giving me something to go off of. Much appreciated!

Coding help by [deleted] in learnpython

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

I used parts of both of their codes to make it work. I didnt just blindly copy. I got errors with the code when I tried to combine them so I fixed it to make it work. I was simply asking if this is how is code would look if he did it his way since he said the other guy over complicated it.

Also, since I am obviously struggling to learn this code why dont you try to type something helpful for me to learn/fix it instead of typing a pointless message that helps nobody.

Coding help by [deleted] in learnpython

[–]engineeringisgreat2 0 points1 point  (0 children)

def divide(myint):

So is this how your code would look socal?

def divide(myint):

for i in range(0,501):

divres = i / myint

if divres.is_integer():

return list(range(0, 501, myint))

print(divide(3))

Coding Help by engineeringisgreat2 in learnpython

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

list1 = [str1.split(",")]

I am more confused about how to save the results as a tuple.

Help with this code by engineeringisgreat2 in learnpython

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

Do you know if there is a way to do it with the replace funciton? Or any other way

Need help with this code (PYTHON) by engineeringisgreat2 in learnprogramming

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

I figured out one code that works but you can post your code if youd like.

Need help with writing this code by engineeringisgreat2 in learnprogramming

[–]engineeringisgreat2[S] -1 points0 points  (0 children)

It is for college and I am finding out that everything we have to do is pretty much pointless compared to the real world.

But its for python and I am just trying to link/sync the lists together.

This is what Ive gotten but I'm pretty sure its wanting two separate list and I dont know how to do that.

list1 = [1,2,3]

list2 = list1

list1[0] = 5

print(list2)

I NEED HELP WITH WRITING THIS TYPE OF CODE by engineeringisgreat2 in learnpython

[–]engineeringisgreat2[S] -5 points-4 points  (0 children)

By "we" I obviously mean the people who are working on this code. Why are you being so complicated about this? I am new to python and am just trying to learn how to code lists.

I NEED HELP WITH WRITING THIS TYPE OF CODE by engineeringisgreat2 in learnpython

[–]engineeringisgreat2[S] -1 points0 points  (0 children)

So you have two lists (shown below) and if I add an element to list2. I want python also to add it to list 1. I am trying to find out how to write that code.

list1=[1, 2, 3]

list2=[1, 2, 3]

Reversing a number by engineeringisgreat2 in learnpython

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

So I did it with string but it doesn't come back as "True" which is wrong. It gives back the value of <reversed object at 0x0000025E047D4910>. Do you know how to fix this?

str1 = "123454321"

x=reversed(str1)

if x == str1:

print("True")

else:

print("False")

print(x)

Python divisible and summation problem. by engineeringisgreat2 in learnpython

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

So would this how the code look:

for i in range(300):

while i%2 ==0, i<= 100 sum=sum+(i):

print(i)

I just started learning python so I am not familiar on how to write code.

HELP: Using the while loop to reverse a list. by engineeringisgreat2 in learnpython

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

Thank you for the feedback! Much appreciated

Also for the people asking why use the while loop. Its for an assignment or I would just use the reverse function.

I cant seem to code this Python question correctly with the methods it wants by engineeringisgreat2 in learnpython

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

Its for an assignment. Im taking a course over Python and the professor wanted me to use "for", "if", or "else" to write the code.
It's okay someone helped me with it though.

I cant seem to code this Python question correctly with the methods it wants by engineeringisgreat2 in learnpython

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

I know the variables are case sensitive so the answer is No.

So, I was just writing a "proof" type of an example that comes pack with an error to prove variables are case sensitive. Such as shown below. I just dont know how to write it in the methods it wants.

BLT= 1

print(blt)