Python
I know we have lots of coders on this board. I've been looking for a project recently and would love to start my baby steps towards coding. Python first. I'm a super newbie and these will seem dumb to a lot of you.
Working through an online exercise. I don't want to keep going until I can get the ouput i really want for this early problem. Messing with really basic functions.
message = "Where in the world is Carmen Sandiego"
print((message))
print("
" + "Carmen can be found at postion: ")
print(message.find("Carmen"))
print("
" + "Sandiego can be found at position: ")
print(message.find("Sandiego"))
The output is right, but not structured how I want it. I want it all in one line - when I try something like:
print("'Carmen' can be found at position " + (message.find("Carmen")) + ". " + "'Sandiego' can be found at position " + (message.find("Sandiego")) + ".")
It errors out. Any ideas? (that are super newbie friendly)
Edited By Troy on 1450896052
Working through an online exercise. I don't want to keep going until I can get the ouput i really want for this early problem. Messing with really basic functions.
message = "Where in the world is Carmen Sandiego"
print((message))
print("
" + "Carmen can be found at postion: ")
print(message.find("Carmen"))
print("
" + "Sandiego can be found at position: ")
print(message.find("Sandiego"))
The output is right, but not structured how I want it. I want it all in one line - when I try something like:
print("'Carmen' can be found at position " + (message.find("Carmen")) + ". " + "'Sandiego' can be found at position " + (message.find("Sandiego")) + ".")
It errors out. Any ideas? (that are super newbie friendly)
Edited By Troy on 1450896052
Found it. Without researching too far ahead what i wanted was the str() function.
This is what I wanted:
message = "Where in the world is Carmen Sandiego?"
print(message)
findcarmen = (message.find("Carmen"))
findsandiego = (message.find("Sandiego"))
print("Carmen can be found at postion: " + str(findcarmen))
print("Sandiego can be found at position: " + str(findsandiego))
Edited By Troy on 1450905148
This is what I wanted:
message = "Where in the world is Carmen Sandiego?"
print(message)
findcarmen = (message.find("Carmen"))
findsandiego = (message.find("Sandiego"))
print("Carmen can be found at postion: " + str(findcarmen))
print("Sandiego can be found at position: " + str(findsandiego))
Edited By Troy on 1450905148
Ton of people use python, especially in the "data scientist" world. I've played around with it, but prefer other languages.Troy wrote:Hopefully a good first one to learn and then translate to more topical languages. I'm buckling down for the learning part for now and will see if I still like it a month or two in.
It's not me, it's someone else.
Aren't you a lawyer? I'm curious why one of those would have any use for cross training in software development.Troy wrote:Hopefully a good first one to learn and then translate to more topical languages. I'm buckling down for the learning part for now and will see if I still like it a month or two in.
"Be bold, and mighty forces will come to your aid."
TheCatt wrote:Malcolm wrote:Is it a data specialist with delusions of grandeur.
Uh, no. Generally someone with strong math background + computing. Generally master/phd level peeps.
So ... a normal computer scientist who sucks at designing processes and spends all their time analyzing info? Or are you speaking of what I'd call a numerical specialist? If that's the case, I wouldn't use Python due to performance reasons. I'd break out Matlab, Maple, or straight C.
Edited By Malcolm on 1450922730
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
GORDON wrote:Troy wrote:Hopefully a good first one to learn and then translate to more topical languages. I'm buckling down for the learning part for now and will see if I still like it a month or two in.
Aren't you a lawyer? I'm curious why one of those would have any use for cross training in software development.
I don't have a JD. I'm mostly graphic/technology support for intellectual property cases. Kind of like a specialized litigation paralegal.
I'm self taught on Adobe graphic products. I've dabbled in programming languages before, but never took the plunge to fully understand one. I think my furthest taught language before the last few weeks was HTML camp in HS.
I like my job but I also know the demand for people who can code in-demand languages is only going to keep growing. So far Python has been really fun, but ask me in a few months if I can keep up the learning.
e: and from what I have seen online, the public/free resources for learning are singularly available
Edited By Troy on 1450923271
-
- Posts: 8060
- Joined: Thu May 20, 2004 7:32 pm