I have accomplished what I wanted to do but I think this can be done better. I want my code to look professional.
What my code does is ask for your name and gives output in below form.
Input: Jack
Output: j = joyful a = awesome c = curious k = kindhearted
Please show me how to code in a professional manner by reviewing the below code.
#!/usr/bin/env python
import sys
import string
names = {
'a': 'awesome',
'b': 'bold',
'c': 'curious',
'd':'delightful',
'e':'emotional',
'f':'fearless',
'g':'gifted',
'h':'helpful',
'i':'imaginary',
'j':'joyful',
'k':'kindhearted',
'l':'lovable',
'm':'memorable',
'n':'naughty',
'o':'open',
'p':'playful',
'q':'quarrelsome',
'r':'reliable',
's':'serious',
't':'thoughtful',
'u':'unique',
'v':'victorious',
'w':'wise',
'x':'xerox copy',
'y':'yummy',
'z':'zealous'
}
def main():
i=j=0
user = raw_input("What is your name?: ")
print ""
while i<len(user):
while j<len(names):
if user[i]==names.keys()[j]:
print " " + user[i] + ' = ' + names.values()[j]
j=j+1
while j!=0:
j=0
i=i+1
if __name__ == '__main__':
main()
I have accomplished what I wanted to do but I think this can be done better. I want my code to look professional.
What my code does is ask for your name and gives output in below form.
Input: Jack
Output: j = joyful a = awesome c = curious k = kindhearted
Please show me how to code in a professional manner by reviewing the below code.
#!/usr/bin/env python
import sys
import string
names = {
'a': 'awesome',
'b': 'bold',
'c': 'curious',
'd':'delightful',
'e':'emotional',
'f':'fearless',
'g':'gifted',
'h':'helpful',
'i':'imaginary',
'j':'joyful',
'k':'kindhearted',
'l':'lovable',
'm':'memorable',
'n':'naughty',
'o':'open',
'p':'playful',
'q':'quarrelsome',
'r':'reliable',
's':'serious',
't':'thoughtful',
'u':'unique',
'v':'victorious',
'w':'wise',
'x':'xerox copy',
'y':'yummy',
'z':'zealous'
}
def main():
i=j=0
user = raw_input("What is your name?: ")
print ""
while i<len(user):
while j<len(names):
if user[i]==names.keys()[j]:
print " " + user[i] + ' = ' + names.values()[j]
j=j+1
while j!=0:
j=0
i=i+1
if __name__ == '__main__':
main()
I have accomplished what I wanted to do but I think this can be done better. I want my code to look professional.
What my code does is ask for your name and gives output in below form.
Input: Jack
Output: j = joyful a = awesome c = curious k = kindhearted
Please show me how to code in a professional manner by reviewing the below code.
#!/usr/bin/env python
import sys
import string
names = {
'a': 'awesome',
'b': 'bold',
'c': 'curious',
'd':'delightful',
'e':'emotional',
'f':'fearless',
'g':'gifted',
'h':'helpful',
'i':'imaginary',
'j':'joyful',
'k':'kindhearted',
'l':'lovable',
'm':'memorable',
'n':'naughty',
'o':'open',
'p':'playful',
'q':'quarrelsome',
'r':'reliable',
's':'serious',
't':'thoughtful',
'u':'unique',
'v':'victorious',
'w':'wise',
'x':'xerox copy',
'y':'yummy',
'z':'zealous'
}
def main():
i=j=0
user = raw_input("What is your name?: ")
print ""
while i<len(user):
while j<len(names):
if user[i]==names.keys()[j]:
print " " + user[i] + ' = ' + names.values()[j]
j=j+1
while j!=0:
j=0
i=i+1
if __name__ == '__main__':
main()
I have accomplished what I wanted to do but I think this is the best way to do thiscan be done better. I want tomy code like ato look professional.
What my code does is ask for your name and gives output in below form.
Input: Jack
Output: j = joyful a = awesome c = curious k = kindhearted
Please show me how to do codingcode in a professional way and reviewmanner by reviewing the below code.
#!/usr/bin/env python
import sys
import string
names = {
'a': 'awesome',
'b': 'bold',
'c': 'curious',
'd':'delightful',
'e':'emotional',
'f':'fearless',
'g':'gifted',
'h':'helpful',
'i':'imaginary',
'j':'joyful',
'k':'kindhearted',
'l':'lovable',
'm':'memorable',
'n':'naughty',
'o':'open',
'p':'playful',
'q':'quarrelsome',
'r':'reliable',
's':'serious',
't':'thoughtful',
'u':'unique',
'v':'victorious',
'w':'wise',
'x':'xerox copy',
'y':'yummy',
'z':'zealous'
}
def main():
i=j=0
user = raw_input("What is your name?: ")
print ""
while i<len(user):
while j<len(names):
if user[i]==names.keys()[j]:
print " " + user[i] + ' = ' + names.values()[j]
j=j+1
while j!=0:
j=0
i=i+1
if __name__ == '__main__':
main()
I have accomplished what I wanted to do but I think this is the best way to do this. I want to code like a professional. Please show me how to do coding in a professional way and review the below code.
#!/usr/bin/env python
import sys
import string
names = {
'a': 'awesome',
'b': 'bold',
'c': 'curious',
'd':'delightful',
'e':'emotional',
'f':'fearless',
'g':'gifted',
'h':'helpful',
'i':'imaginary',
'j':'joyful',
'k':'kindhearted',
'l':'lovable',
'm':'memorable',
'n':'naughty',
'o':'open',
'p':'playful',
'q':'quarrelsome',
'r':'reliable',
's':'serious',
't':'thoughtful',
'u':'unique',
'v':'victorious',
'w':'wise',
'x':'xerox copy',
'y':'yummy',
'z':'zealous'
}
def main():
i=j=0
user = raw_input("What is your name?: ")
print ""
while i<len(user):
while j<len(names):
if user[i]==names.keys()[j]:
print " " + user[i] + ' = ' + names.values()[j]
j=j+1
while j!=0:
j=0
i=i+1
if __name__ == '__main__':
main()
I have accomplished what I wanted to do but I think this can be done better. I want my code to look professional.
What my code does is ask for your name and gives output in below form.
Input: Jack
Output: j = joyful a = awesome c = curious k = kindhearted
Please show me how to code in a professional manner by reviewing the below code.
#!/usr/bin/env python
import sys
import string
names = {
'a': 'awesome',
'b': 'bold',
'c': 'curious',
'd':'delightful',
'e':'emotional',
'f':'fearless',
'g':'gifted',
'h':'helpful',
'i':'imaginary',
'j':'joyful',
'k':'kindhearted',
'l':'lovable',
'm':'memorable',
'n':'naughty',
'o':'open',
'p':'playful',
'q':'quarrelsome',
'r':'reliable',
's':'serious',
't':'thoughtful',
'u':'unique',
'v':'victorious',
'w':'wise',
'x':'xerox copy',
'y':'yummy',
'z':'zealous'
}
def main():
i=j=0
user = raw_input("What is your name?: ")
print ""
while i<len(user):
while j<len(names):
if user[i]==names.keys()[j]:
print " " + user[i] + ' = ' + names.values()[j]
j=j+1
while j!=0:
j=0
i=i+1
if __name__ == '__main__':
main()
I am noob in python and try to code. I have accomplished what I wanted to do but I think this is the best way to do this. I want to code like a professional. Please show me how to do coding in a professional way and review the below code.
#!/usr/bin/env python
import sys
import string
names = {
'a': 'awesome',
'b': 'bold',
'c': 'curious',
'd':'delightful',
'e':'emotional',
'f':'fearless',
'g':'gifted',
'h':'helpful',
'i':'imaginary',
'j':'joyful',
'k':'kindhearted',
'l':'lovable',
'm':'memorable',
'n':'naughty',
'o':'open',
'p':'playful',
'q':'quarrelsome',
'r':'reliable',
's':'serious',
't':'thoughtful',
'u':'unique',
'v':'victorious',
'w':'wise',
'x':'xerox copy',
'y':'yummy',
'z':'zealous'
}
def main():
i=j=0
user = raw_input("What is your name?: ")
print ""
while i<len(user):
while j<len(names):
if user[i]==names.keys()[j]:
print " " + user[i] + ' = ' + names.values()[j]
j=j+1
while j!=0:
j=0
i=i+1
if __name__ == '__main__':
main()
I am noob in python and try to code. I have accomplished what I wanted to do but I think this is the best way to do this. I want to code like professional. Please show me to do coding in professional way and review below code.
#!/usr/bin/env python
import sys
import string
names = {
'a': 'awesome',
'b': 'bold',
'c': 'curious',
'd':'delightful',
'e':'emotional',
'f':'fearless',
'g':'gifted',
'h':'helpful',
'i':'imaginary',
'j':'joyful',
'k':'kindhearted',
'l':'lovable',
'm':'memorable',
'n':'naughty',
'o':'open',
'p':'playful',
'q':'quarrelsome',
'r':'reliable',
's':'serious',
't':'thoughtful',
'u':'unique',
'v':'victorious',
'w':'wise',
'x':'xerox copy',
'y':'yummy',
'z':'zealous'
}
def main():
i=j=0
user = raw_input("What is your name?: ")
print ""
while i<len(user):
while j<len(names):
if user[i]==names.keys()[j]:
print " " + user[i] + ' = ' + names.values()[j]
j=j+1
while j!=0:
j=0
i=i+1
if __name__ == '__main__':
main()
I have accomplished what I wanted to do but I think this is the best way to do this. I want to code like a professional. Please show me how to do coding in a professional way and review the below code.
#!/usr/bin/env python
import sys
import string
names = {
'a': 'awesome',
'b': 'bold',
'c': 'curious',
'd':'delightful',
'e':'emotional',
'f':'fearless',
'g':'gifted',
'h':'helpful',
'i':'imaginary',
'j':'joyful',
'k':'kindhearted',
'l':'lovable',
'm':'memorable',
'n':'naughty',
'o':'open',
'p':'playful',
'q':'quarrelsome',
'r':'reliable',
's':'serious',
't':'thoughtful',
'u':'unique',
'v':'victorious',
'w':'wise',
'x':'xerox copy',
'y':'yummy',
'z':'zealous'
}
def main():
i=j=0
user = raw_input("What is your name?: ")
print ""
while i<len(user):
while j<len(names):
if user[i]==names.keys()[j]:
print " " + user[i] + ' = ' + names.values()[j]
j=j+1
while j!=0:
j=0
i=i+1
if __name__ == '__main__':
main()