This post has been edited by andrewsw: 21 February 2015 - 04:23 PM
17 Replies - 2673 Views - Last Post: 25 February 2015 - 01:11 PM
#16
Re: Question about lesson #19 Learn python the hard way
Posted 21 February 2015 - 04:22 PM
Here is a screencast on how to use code tags. They are essential for Python code.
#17
Re: Question about lesson #19 Learn python the hard way
Posted 25 February 2015 - 11:03 AM
jon.kiparsky, on 18 February 2015 - 01:03 PM, said:
I think I put my reply on my name and not your name.
Please tell me if I'm closer this time?. I really want to get better at python and I like to try and figure out puzzles problems on python. This is what I think you wanted me to do.
#params = {'foo':10,'bar':20,'baz':30'}
#I can leave it as an integer
foo=10
#I can also convert an integer into a string and reverse the process.
bar=13
baz="This is a number..."
bar=str(bar)
print baz+bar
#This is my favourite hockey players number...13
#We can also reverse the process...
baz ='30'
bar=20
print int(baz)+bar
#The answer will show 50.
This post has been edited by xclite: 25 February 2015 - 01:10 PM
Reason for edit:: Fixing code tags
#18
Re: Question about lesson #19 Learn python the hard way
Posted 25 February 2015 - 01:11 PM
Just an FYI on code tags - the code must go between the code tags.
You can also insert a bunch of code, highlight it with your cursor, and click the "[CODE]" button in the reply control panel.
You can also insert a bunch of code, highlight it with your cursor, and click the "[CODE]" button in the reply control panel.

New Topic/Question
Reply



MultiQuote



|