Hi :) i'm kind of new to this site and everytime I read a thread someone else makes i don't understand what anyone is saying.... :sad: well anyways, please help me python pros.
I have been on my very first exercise of "Learn Pyhton the Hard Way" since two weeks ago and i can't seem to understand the extra credit. How exactly do you print another line in a script? and what is a script? and what is a octothorpe?
I use windows vista if that will help for your guys to answer :)

A script is a python program like ex1.py (actually a script is a program in some scripting language, like python, perl, sh, etc). Google says that an octothorpe is the '#' symbol.

do you know how to make another line in the script? :)

do you know how to make another line in the script? :)

Well did you type and run the script ex1.py ? it prints 7 lines of output. The question is to add an 8th line, it shouldn't be that difficult.

script you already understand as explained by Gribouillis /// octothorpe as Google says its # symbol.....it is used for comment in python script.,.....and it is also used in shebang.....which is the first line of any script which explain which interpreter you have to use( in linux i know, nvr done coding in vista).......

Well did you type and run the script ex1.py ? it prints 7 lines of output. The question is to add an 8th line, it shouldn't be that difficult.

I tried putting
print "a new line."
then when I saved it and tried to run the script the script only showed the first 7 lines

I tried putting
print "a new line."
then when I saved it and tried to run the script the script only showed the first 7 lines

Please post your whole script, using code-tags.

i don't know how.... sorry

Hello Trak :)

I hoep you are doing good :) , Python is very easy , i give you a very simple example to bigin , open your editor where you write a Python code and copy this code after clicking on (Toggle Plain Text) here (up the code i give you ) , or just write it letter by letter and with respecting the order of the ecriture :

#!/usr/bin/env python
print "Hiii Trak :) "

Execute it , maybe by pushing F5 , and if you want add an other line , maybe in windows copy/past don't work , so you need copy a line by (Ctrl+c) and past by (Ctrl+v) , or you go the the last thing in your last line in your code and push "Enter" and write lettre by lettre your new line , save the file and execute it again , good luck Trak :) .

Hello Trak :)

I hoep you are doing good :) , Python is very easy , i give you a very simple example to bigin , open your editor where you write a Python code and copy this code after clicking on (Toggle Plain Text) here (up the code i give you ) , or just write it letter by letter and with respecting the order of the ecriture :

#!/usr/bin/env python
print "Hiii Trak :) "

Execute it , maybe by pushing F5 , and if you want add an other line , maybe in windows copy/past don't work , so you need copy a line by (Ctrl+c) and past by (Ctrl+v) , or you go the the last thing in your last line in your code and push "Enter" and write lettre by lettre your new line , save the file and execute it again , good luck Trak :) .

THANK YOU!!

Read what Zed Shaw says in the book. He explains that an octothorp is a # sign. And a script is any program that you write. I hope that this helps you and also if you mean to make a new line like the same way as pressing enter just do

print"blah\n"

wow - I was looking for this and had no hope to get the exact solution. Internet is a wonderful place and you ppl are awesome :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.