Stats: 3,190,986 members, 7,942,539 topics. Date: Saturday, 07 September 2024 at 11:58 AM |
Nairaland Forum / Science/Technology / Programming / Please Am Stuck Here. (python Tutorial) (1282 Views)
My First Python Tutorial Has Been Released. / I Am Stuck With This Problem (JAVA EE) / Python Tutorial (2) (3) (4)
Please Am Stuck Here. (python Tutorial) by furthest(m): 4:18pm On Aug 01, 2016 |
In many cases we will use a feature of program execution in Idle: that after program execution is completed, the Idle Shell still remembers functions defined in the program. This is not true if you run a program by selecting it directly in the operating system. Look at the example program birthday3.py. See it just adds two more lines, not indented. Can you guess what it does? Try it: 1 ’’’Function definition and invocation.’’’ 2 3 def happyBirthdayEmily(): 4 print("Happy Birthday to you!" ![]() 5 print("Happy Birthday to you!" ![]() 6 print("Happy Birthday, dear Emily." ![]() 7 print("Happy Birthday to you!" ![]() 8 9 happyBirthdayEmily() 10 happyBirthdayEmily() 1 Like |
Re: Please Am Stuck Here. (python Tutorial) by Nobody: 5:10pm On Aug 01, 2016 |
Use PyCharm for learning and not that default shell |
Re: Please Am Stuck Here. (python Tutorial) by furthest(m): 9:21pm On Aug 01, 2016 |
please just tell me what's wrong...i love the shell am using |
Re: Please Am Stuck Here. (python Tutorial) by zzzzy: 12:21am On Aug 02, 2016 |
I don't really understand the problem. That program ran perfectly. |
Re: Please Am Stuck Here. (python Tutorial) by furthest(m): 1:20pm On Aug 02, 2016 |
zzzzy:yeah i know, i just need an explanation. |
Re: Please Am Stuck Here. (python Tutorial) by Nobody: 2:38pm On Aug 02, 2016 |
furthest: i just tried it in python 2.7 (using the IDLE) and it worked just fine! So whats the problema? |
Re: Please Am Stuck Here. (python Tutorial) by Xionglu(m): 3:49pm On Aug 02, 2016 |
furthest: When you write scripts on shell, it is not auto indented but u can indent it by using the tab key....shell not remembering the function declared, I doubt that.....i use the shell a lot on Kali Linux for testing some code before rewriting it in my editor... As someone said earlier, use an editor rather than shell if u are a newbie.....Python is cool To add, you don't get the real power of python in windows, go dirty like a friend said to me,that is use Linux...python comes preinstalled with it and some other libraries. Real programmers don't use windows, switch your style up bro.....see u @ d top |
(1) (Reply)
Any Good Developer And Graphic Designer Ready To Form A Team For A Start Up / How To Increase Google Adsense CPC: Cost Per Click For Youtube And Website 2016 / Pythonists Please Help!!....def Functionname(self)...confusing Me..
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10 |