No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Dear Group, I am getting some questions on doing Web Pages in Python. I have some interactive codes in python for which I like to make web pages. I am trying to use kid. Kid I learnt, and is easy, too. My questions are: i) Am I going correct? ii) … |
|
Dear Group, I am trying the following code line: [code] def try2(n): a1=raw_input("PRINT A STRING:") a2=a1.split() a3="God Godess Heaven Sky" for x in a2: a4=a3.find(x) if a4>-1: a5=a3[a4] print a5 elif a4<0: a6=x print "It is not found" print a6 else: print "Error" s=a5+" "+a6 print s [/code] Here, if … |
|
Dear All, I am trying to write the following code: def try1(n): a1="God Godess Borother Sister Family" a2=a1.split() a3=raw_input("PRINT A WORD") a4=a1.find(a3) print a4 a5=[] if a4>0: a5=a2.index(a3) a6=a5+1 a7=a2[a6] print "The new word is" print a7 a8=a5.append(a7) print a5 elif a4<0: a11=a3 print "The word is not availiable in … |
|
If I write a code like: def addstring(n): a1=raw_input("PRINT THE FIRST STRING:") a2=raw_input("PRINT THE SECOND STRING:") a3=" " a4=a1+a3+a2 print "THE TWO STRINGS YOU PRINTED ARE ADDED AS" print a4 Now, if I design one HTML form where strings can be submitted but if I put one ADD button how … |
|
If we write a code like: a=['city','village','town','capital'] a1=len(a) a2=range(a1) for x in a2: a3=a[x] print a3 In this code if we want to store the value of a3 it would store last value always. But in any way can we store all the values? |
|
I am using a while loop like while a>0: a=a+1 a1=open("/python25/file1.txt","r+") a2=str(a) a3=a1.write(a2) It is storing only the last value of a, but how can I store any row or all the rows in file? |
|
Re:
Hi all, Im new to python and I need some help. I have tried to get this piece of code to work for quite some time now. I finally made it work by using two while-loops. [INDENT][B]THE PROBLEM[/B][/INDENT] What I really wanted to do at the first place was to … |