Re: [Tutor] A Byte of Python or Learn python the hard way
https://www.coursera.org/course/interactivepython?from_restricted_preview=1&course_id=971041&r=https%3A%2F%2Fclass.coursera.org%2Finteractivepython-003%2Fclass On 13 April 2014 18:29, Ben Finney wrote: > keith papa writes: > > > I want to start learning python today > > Welcome. > > What is your current level of programming knowledge? What langauges, if > any, do you already use? > > What are your goals for learning Python? What will you use it for? > > -- > \ "Few things are harder to put up with than the annoyance of a | > `\ good example." --Mark Twain, _Pudd'n'head Wilson_ | > _o__) | > Ben Finney > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > -- Luke Pettit ,,, ^..^,,, http://lukepettit-3d.blogspot.com/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] why do i keep getting syntax errors in python when this runs
def main (): Celsius = float (input ("What is the Celsius temperature? ")) Fahrenheit = 9.0 / 5.0 * Celsius + 32 print("The temperature is ", Fahrenheit, " degrees Fahrenheit.") main() You need to check your capitalisation on all the basic things for a start # def main() Def? # then you call it with Main()? On 7 September 2013 17:09, James Griffin wrote: > !-- On Fri 6.Sep'13 at 5:27:23 BST, mike johnson (pretor...@hotmail.com), > wrote: > > can you please help me figure out why this isnt working thanks > > # convert.py > > # this program is used to convert Celsius temps to Fahrenheit > > # By: James Michael Johnson > > > > Def main (): > > Celsius = float (input ("What is the Celsius temperature? ")) > > Fahrenheit = 9.0 / 5.0 * Celsius + 32 > > Print ("The temperature is ", Fahrenheit, " degrees Fahrenheit.") > > > > > > Main () > > [ ...] > > > # convert.py > > # this program is used to convert Celsius temps to Fahrenheit > > # By: James Michael Johnson > > > > Def main (): > > Celsius = float (input ("What is the Celsius temperature? ")) > > Fahrenheit = 9.0 / 5.0 * Celsius + 32 > > Print ("The temperature is ", Fahrenheit, " degrees Fahrenheit.") > > > > > > Main () > > I'm sure this is homework. I had a peice of homework in my first year > Undergrad exactly like this. > > -- > > > James Griffin: jmz at kontrol.kode5.net > > A4B9 E875 A18C 6E11 F46D B788 BEE6 1251 1D31 DC38 > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > -- Luke Pettit ,,, ^..^,,, http://lukepettit-3d.blogspot.com/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Coursera Python Course starts today
https://plus.google.com/u/0/communities/10076754413628630 Is a G+ community for that very course feel free to join On 20 August 2013 16:14, Anung Ariwibowo wrote: > Just started today before catching bus to work. I will start this evening. > > Regards, > Anung > > > On 8/20/13, Leam Hall wrote: > > A little cooperation is motivating. I have finished up Week 1 but I was > > a few minutes late for work this morning! :) > > > > You? > > > > Leam > > > > On 08/19/2013 08:12 PM, barli...@gmail.com wrote: > >> Let's discuss our progress then, if it is allowed by list rules. I was > >> just retake the course as well. > >> > >> Regards, > >> Anung > >> > >> Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung > >> Teruuusss...! > >> > >> -Original Message- > >> From: Leam Hall > >> Sender: "Tutor" Date: > Mon, 19 > >> Aug 2013 20:02:25 > >> To: > >> Subject: [Tutor] Coursera Python Course starts today > >> > >> Hey all, > >> > >> In case I'm not the absolute last person to know, the newest edition of > >> the Coursera "Learn to Program" course started today. It is Python > >> based, free, lasts 7 weeks, and pretty fun. I didn't get a certificate > >> last time as life got in the way. Hope to succeed this time. > >> > >> https://class.coursera.org/programming1-002/class/index > >> > >> Leam > >> > > -- > > http://31challenge.net > > http://31challenge.net/insight > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- Luke Pettit ,,, ^..^,,, http://lukepettit-3d.blogspot.com/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] While Loops: Coin Flip Game :p:
Arrr thats better Nithya it works fine now. I had it working fine before it was just coming up with that strange result of 73 and 100 when I copied the code into wing to check it out in order to understand it. Wing picked up the spacing and I had already corrected that Dave as I was simply looking at Nithya code. On 16 November 2010 19:10, Nithya Nisha wrote: > Hi there, > > This is the Code. Please check it.It is working fine. > > >>>import random > >>>headsCount = 0 > >>>tailsCount = 0 > >>>count = 1 > >>> > >>>while count <= 100: > >>> coin = random.randrange(2) > >>> if coin == 0: > >>> headsCount += 1 > >>> else: > >>> tailsCount += 1 > >>> count += 1 > >>> > >>>print "The number of heads was", headsCount > >>>print "The number of tails was", tailsCount > >>> > >>>raw_input("\n\nPress the enter key to exit.") > > > > * > Your Description *: > > On Tue, Nov 16, 2010 at 1:25 PM, Dave Angel wrote: > >> When I run this code (I'm also a noob) I get this result:- >>> >>> [evaluate lines 1-22 from untitled-1.py] >>>>>> >>>>> The number of heads was 73 >>> The number of tails was 100 >>> >>> Press the enter key to exit. >>> >>> # Surely, if flipping a single coin 100 times your total number of heads >>> and >>> tails should add up to 100 >>> # not 173 or am I missing the point? >>> >>> >>> No, you're missing an indentation. If you check the code you're >> running, I think you'll find that you didn't unindent the line incrementing >> count. >> >> Of course, it's less error prone to simply use >> for count in xrange(100): >> >> instead of while count < 100: >> >> and you wouldn't need to increment count. >> >> DaveA >> >> > > > -- > With Regards, > Nithya S > > -- Luke Pettit ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] While Loops: Coin Flip Game :p:
When I run this code (I'm also a noob) I get this result:- >>> [evaluate lines 1-22 from untitled-1.py] The number of heads was 73 The number of tails was 100 Press the enter key to exit. # Surely, if flipping a single coin 100 times your total number of heads and tails should add up to 100 # not 173 or am I missing the point? On 16 November 2010 15:08, Nithya Nisha wrote: > Hi Tom, > > Your code is almost correct. Little mistake is there.The random number > generate should be in while loop. > > > import random > > > > # set the coin > > > headsCount = 0 > > tailsCount = 0 > > count = 0 > > > > # the loop > > while count < 100: #If > you declare count = 0. The while loop condition should be less than > 100.Else you will get 101 counts. > > *coin = random.randrange(2)* > > if coin == 0: > > headsCount += 1 > >else: #Becase We > already declared randrange(2).So the coin value is 0 or 1.So we can use else > condition. > > tailsCount += 1 > > count += 1 > > > > > > print "The number of heads was", headsCount > > print "The number of tails was", tailsCount > > > > raw_input("\n\nPress the enter key to exit.") > > Regards, > Nithya > > > _ > * > Your Description*: > > On Mon, Nov 15, 2010 at 7:19 AM, Thomas C. Hicks wrote: > >> On Sun, 14 Nov 2010 17:16:36 -0500 >> Dawn Samson wrote: >> >> > Greetings, >> > >> > I'm a Python beginner and working my way through Michael Dawson's >> > Python Programming for the Absolute Beginner. I'm stuck in a >> > particular challenge that asks me to write a program that "flips a >> > coin 100 times and then tells you the number of heads and tails." >> > I've been trying to work on this challenge for a while now and can't >> > get it to work (either it has 100 heads or 100 tails). I've been >> > reworking this code many times and currently what I have does not do >> > anything at all at IDLE. Please take a look at my code below: >> > >> > import random >> > >> > # set the coin >> > coin = random.randrange(2) >> > headsCount = 0 >> > tailsCount = 0 >> > count = 0 >> > >> > # the loop >> > while count <= 100: >> > coin >> > if coin == 0: >> > headsCount += 1 >> > if coin == 1: >> > tailsCount += 1 >> > count += 1 >> > >> > >> > print "The number of heads was", heads >> > print "The number of tails was", tails >> > >> > raw_input("\n\nPress the enter key to exit.") >> > >> > Thanks, >> > S. Dawn Samson >> >> >From one beginner to another - it looks to me like you set the value of >> coin once then checked it 100 times. If you want to reset the value of >> coin maybe it (i.e. setting the value of coin, not just calling >> the value of coin) should be in the loop too? >> >> tom >> ___ >> Tutor maillist - Tutor@python.org >> To unsubscribe or change subscription options: >> http://mail.python.org/mailman/listinfo/tutor >> > > > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > > -- Luke Pettit ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Columnar Transposition Cipher question
I can suggest that the X should probably be a "D" you may want to check this with your tutor Although as a python noob I don't have the foggiest on how to do this in python, but will keep this for an exercise for if, and when I do. On paper it's pretty simple once you Wikipedia it. On 9 November 2010 12:55, Wayne Werner wrote: > On Mon, Nov 8, 2010 at 5:28 PM, Natalie Kristine T. Castillo < > ncasti...@umail.ucsb.edu> wrote: > >> Hi, I need help on how exactly to solve this: >> >> To send secret messages you and your partner have decided to use the >> columnar function you have written to perform columnar transposition cipher >> for this course. You have received the ciphertext EXLYHILOSHOOAETU from your >> friend. You two decide to use the keyword MARS. What message did your friend >> send you? Show your steps and do it by hand. >> > > This sounds an awful lot like homework. It's not our policy to solve > homework, but if you get stuck we'll happily give you nudges in the right > direction. > > This problem also happens to be language agnostic - meaning it doesn't > matter whether you solve it in Python, Assembly, C++, Ruby, or by hand. > > Of course the problem description also says show your steps and do it by > hand, which suggests that the problem is not terribly difficult to solve if > you have some familiarity with the columnar transposition cipher. I've never > heard of it before, but I'm sure www.google.com and > http://en.wikipedia.org have plenty to say on the subject. > > HTH, > Wayne > > _______ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > > -- Luke Pettit ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Hi
Wow information overload lol Thanks everyone this is great. On 7 November 2010 13:43, trench wrote: > I'd also point out that Google has created a very awesome Python course > which is heavily dependent on video lectures by Nick Parlante. Included in > the course are downloadable exercises and examples (all mentioned in the > video lectures). After you review all of this quality (not to mention free) > material... I think you'll fully understand what separates Google from its > competitors. (By this, I simply mean that you will not see similar offerings > from, say, Facebook, Apple, or MS.) > > http://code.google.com/edu/languages/google-python-class/index.html > > <http://code.google.com/edu/languages/google-python-class/index.html>This > is a part of Google's "Google Code University". Here's the root URL for the > entire project: http://code.google.com/edu/ -- definitely worth checking > out. > > -trench > > On Fri, Nov 5, 2010 at 8:12 PM, Luke Pettit wrote: > >> Hi everyone, >> I'm just about to begin to learn python and have bookmarked a number of >> sites to learn from >> http://www.alan-g.me.uk/ is the main one but after reading this >> >> ""On Nov 4, 2010, at 3:10 PM, Glen Clark wrote: >> >> Hello, >> >> I have completed my first python script. This is after watching a video >> guide on python and is my first attempt at writing code in python. While the >> code is not very useful I got the idea for it when googling "python projects >> for beginners"."" >> >> >> I was interested in which video tutorials Glen was watching, and if anyone >> else could recommend some video tutorials to watch, mainly because of a mild >> dyslexia and preference for video tutorials. >> >> I have been learning Autodesk 3d Studio Max >> http://south-apac.autodesk.com/adsk/servlet/pc/index?siteID=1157326&id=15474303 >> for >> several years and learning it's scripting language Maxscript >> http://rosettacode.org/wiki/Category:MAXScript and since Autodesk now own >> all the competitors software and they all (except Max) use Python for >> their coding I thought it would be the way to go when learning a new >> language. Blender also uses Python btw. >> >> My 3d site http://lukepettit-3d.blogspot.com/ >> >> -- >> Luke Pettit >> >> ___ >> Tutor maillist - Tutor@python.org >> To unsubscribe or change subscription options: >> http://mail.python.org/mailman/listinfo/tutor >> >> > > > -- > - t > -- Luke Pettit ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Hi
Thanks Alan I found those about an hour ago :) On 6 November 2010 20:11, Alan Gauld wrote: > > "Luke Pettit" wrote > > > I was interested in which video tutorials Glen was watching, and if anyone >> else could recommend some video tutorials to watch, >> > > I don;t know what Glen was watching but thhere are a whole bunch of > videos at showmedo.com > > Alan G. > > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- Luke Pettit ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Hi
Hi everyone, I'm just about to begin to learn python and have bookmarked a number of sites to learn from http://www.alan-g.me.uk/ is the main one but after reading this ""On Nov 4, 2010, at 3:10 PM, Glen Clark wrote: Hello, I have completed my first python script. This is after watching a video guide on python and is my first attempt at writing code in python. While the code is not very useful I got the idea for it when googling "python projects for beginners"."" I was interested in which video tutorials Glen was watching, and if anyone else could recommend some video tutorials to watch, mainly because of a mild dyslexia and preference for video tutorials. I have been learning Autodesk 3d Studio Max http://south-apac.autodesk.com/adsk/servlet/pc/index?siteID=1157326&id=15474303 for several years and learning it's scripting language Maxscript http://rosettacode.org/wiki/Category:MAXScript and since Autodesk now own all the competitors software and they all (except Max) use Python for their coding I thought it would be the way to go when learning a new language. Blender also uses Python btw. My 3d site http://lukepettit-3d.blogspot.com/ -- Luke Pettit ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor