Current Events > guys. i am learning to code after everyone saying to do it for so long.

Topic List
Page List: 1
Zithers
02/18/23 4:39:09 PM
#1:


chatgpt told me to use python to better learn about stats and do linear regression models lol

so i am doing python lessons rn

any tips bros

i am not computer savvy at all but i've really only been tripped up on one thing so far

Sum of lengths
Define a function named length_sum that computes the sum of the lengths of two strings.
The function length_sum should take two parameters. The two parameters are strings.
Your function should compute the length of each string, storing these lengths in variables. Add the lengths together and return the result.

so its going ok besides this. i just asked for the solution - i guess it makes sense but it would probably help if i knew/understood terminology better, which i assume will come with time.

---
http://24.media.tumblr.com/tumblr_m02lct2g9l1qdlvg6o1_500.gif
https://www.gamefaqs.com/boards/1283-quality-cinema-club
... Copied to Clipboard!
Zithers
02/18/23 4:48:20 PM
#2:


@blue_inigo you know how to code bro?

---
http://24.media.tumblr.com/tumblr_m02lct2g9l1qdlvg6o1_500.gif
https://www.gamefaqs.com/boards/1283-quality-cinema-club
... Copied to Clipboard!
Anteaterking
02/18/23 4:49:57 PM
#3:


Do you know how to calculate the length of one string?

---
http://i18.photobucket.com/albums/b136/Anteaterking/scan00021.jpg
http://i18.photobucket.com/albums/b136/Anteaterking/scan00021.jpg
... Copied to Clipboard!
darkmaian23
02/18/23 5:07:09 PM
#4:


You aren't taking Python lessons from ChatGPT itself, are you? It's confidently wrong about a lot of stuff and you won't know the difference if you are a beginner.

Anyway, to answer your question, the len() function returns the length of a string, and you use def to create a new function in Python. Putting those together, we have:

def length_sum(s1, s2):
return len(s1) + len(s2)

---
Cuteness is justice! It's the law.
... Copied to Clipboard!
Zithers
02/18/23 5:14:13 PM
#5:


darkmaian23 posted...
You aren't taking Python lessons from ChatGPT itself, are you? It's confidently wrong about a lot of stuff and you won't know the difference if you are a beginner.

Anyway, to answer your question, the len() function returns the length of a string, and you use def to create a new function in Python. Putting those together, we have:

def length_sum(s1, s2):
return len(s1) + len(s2)

no i realized pretty quickly chat gpt is stupid lol i'm using python principles for lessons... free premium membership to get all the lessons!

also i don't think that was the answer but im past it now. prob woulda made more sense had i not been doing it at 2am..... doing some debugging lesson

---
http://24.media.tumblr.com/tumblr_m02lct2g9l1qdlvg6o1_500.gif
https://www.gamefaqs.com/boards/1283-quality-cinema-club
... Copied to Clipboard!
Shadow_Don
02/18/23 5:18:04 PM
#6:


Sounds like you are interested in data science and statistics?

If you are trying to learn this for career purposes I'll just warn you right away that is a very difficult field to get into without a relevant degree.

---
"The soul in the darkness sins, but the real sinner is he who caused the darkness." - Victor Hugo
... Copied to Clipboard!
Anteaterking
02/18/23 5:20:27 PM
#7:


Zithers posted...


also i don't think that was the answer but im past it now. prob woulda made more sense had i not been doing it at 2am..... doing some debugging lesson

You can also do return(len(s1+s2)) but it's not inherently better or worse than darkmaian's answer.

---
http://i18.photobucket.com/albums/b136/Anteaterking/scan00021.jpg
http://i18.photobucket.com/albums/b136/Anteaterking/scan00021.jpg
... Copied to Clipboard!
Zithers
02/18/23 5:27:50 PM
#8:


Shadow_Don posted...
Sounds like you are interested in data science and statistics?

If you are trying to learn this for career purposes I'll just warn you right away that is a very difficult field to get into without a relevant degree.

no i am not doing this for a career lmao

i play a realistic baseball simulator/team management game in an online league with 39 other people and would like an edge. other people who play the game have developed calculators but theyre for modern day which our league is not set in so it isn't particularly useful to me. they're also not as specific as what i'm looking for anyway. so yeah.

another guy in the league who is doing data science for grad school is interested in working with me to do it so that will be handy i guess.

---
http://24.media.tumblr.com/tumblr_m02lct2g9l1qdlvg6o1_500.gif
https://www.gamefaqs.com/boards/1283-quality-cinema-club
... Copied to Clipboard!
vegeta415
02/18/23 5:28:59 PM
#9:


Get a friend to
help you cheat.
... Copied to Clipboard!
Zithers
02/18/23 5:34:17 PM
#10:


vegeta415 posted...
Get a friend to
help you cheat.

i'm the commissioner and can see every player's 'real' ratings anyway... but cheating wouldn't be fun, now would it? real ratings are on a 1-250 point scale but the game, as real baseball does, uses a 20-80 bell curve grading scale in increments of five to represent standard deviations. so there's various tools every player has that are graded on that scale and the goal is to see how well those correlate to various stats (avg, obp, slg, babip) and then ideally figure out how to project wrc+ or war. there's a few other things too like batted ball tendencies to look at. along with defensive tools for each position and baserunning tools which have their own stats.

sadly the game is dice roll based instead of physics based so stuff like exit velo and launch angle is irrelevant. v_v

---
http://24.media.tumblr.com/tumblr_m02lct2g9l1qdlvg6o1_500.gif
https://www.gamefaqs.com/boards/1283-quality-cinema-club
... Copied to Clipboard!
vegeta415
02/18/23 5:36:20 PM
#11:


I didnt read all of it I thought you were at school.
... Copied to Clipboard!
Zithers
02/18/23 5:37:01 PM
#12:


smh

---
http://24.media.tumblr.com/tumblr_m02lct2g9l1qdlvg6o1_500.gif
https://www.gamefaqs.com/boards/1283-quality-cinema-club
... Copied to Clipboard!
Jiek_Fafn
02/18/23 5:53:52 PM
#13:


All the coders got laid off. Learn to carpentry

---
I don't believe in belts. There should be no ranking system for toughness.
... Copied to Clipboard!
AloneIBreak
02/18/23 6:21:59 PM
#14:


How are the lessons going?

---
"The civilized man, where he cannot admire, will aim rather at understanding than at reprobating." - Bertrand Russell
... Copied to Clipboard!
Zithers
02/18/23 6:27:29 PM
#15:


AloneIBreak posted...
How are the lessons going?

https://pythonprinciples.com/

like i said i only got stumped on one thing so far

this is a pretty good teacher so far... learning about types and casts now, like int and str and whatnot.

---
http://24.media.tumblr.com/tumblr_m02lct2g9l1qdlvg6o1_500.gif
https://www.gamefaqs.com/boards/1283-quality-cinema-club
... Copied to Clipboard!
Choco
02/19/23 8:15:46 AM
#16:


Zithers posted...
chatgpt told me to use python to better learn about stats and do linear regression models lol

so i am doing python lessons rn
bruh

---
https://i.imgur.com/286sD4e.png
http://error1355.com/ce/Choco.html
... Copied to Clipboard!
Blue_Inigo
02/20/23 1:32:40 PM
#17:


Why

Become a film director. Thats your destiny

---
"This is your last dance."
... Copied to Clipboard!
Zithers
02/20/23 1:38:31 PM
#18:


Blue_Inigo posted...
Why

Become a film director. Thats your destiny

no it isnt cap

---
http://24.media.tumblr.com/tumblr_m02lct2g9l1qdlvg6o1_500.gif
https://www.gamefaqs.com/boards/1283-quality-cinema-club
... Copied to Clipboard!
Topic List
Page List: 1