M.S. 53 Light Poster

for example I don't know what this is called » [('cat', 'meow'), ('dog', 'ruff')]

It's called a list of tuples

so I can now remove the square brackets but I want to make it liek this ↴

catmeow
dogrugg

You can do something like this:

your_list = [('cat', 'meow'), ('dog', 'ruff')]
for tpl in your_list:
    print tpl[0]+tpl[1]
M.S. 53 Light Poster
def main():
    with open(raw_input("Enter file name: ", "r")) as fin:
        for num, line in enumerate(fin.readlines()):
            print("%d: %s"%(num+1, line))

it is without error checking, u
you can add exception catching to it.

M.S. 53 Light Poster

what OS does it have? Android/iOS/Win Mobile?

M.S. 53 Light Poster

or

def shippingRate ( poundage , classification ):
    shipping_rate = poundage * classification
    return shipping_rate
M.S. 53 Light Poster

you should return shipping_rate in the second function:

def shippingRate ( poundage , classification ):
    return poundage * classification
M.S. 53 Light Poster

a ')' at the end of line 1 is missing:

celsius = float(input("What is the Celsius temperature? "))
vegaseat commented: sharp eye +14
M.S. 53 Light Poster
ordertype =  raw_input(" Is the order for pickup or delivery? ")

while True:
    if not (ordertype.lower() in ["p","d"]):
        print "No, Enter only P or D!"
        ordertype =  raw_input("Is the order for pickup or delivery? ")
    else:
        print "Ok, %s Entered" %ordertype
        break
dan.nitschke commented: Excellent Response! +0
M.S. 53 Light Poster

sorry for the typo. please correct line 5 like this:

if query == "y":
M.S. 53 Light Poster

no need to open and close the file several times. for names printing in different lins you can strip the end of line symbol. a simple function is what I would use:

import random

def name_gen()
    query = raw_input("Whould you like to generate a random name? y/n")
    if query == "y" 
        a = random.randint(1, 10)
        b = random.randint(1, 10)
        first_name = open ( 'fname.txt' ).readline(a).strip("\n") 
        last_name = open ( 'lname.txt' ).readline(b).strip("\n")
        print(first_name, last_name)
        name_gen()

name_gen()

there are more solutions that far more expert people here can provide. so condider this post as one option from a novice that I am.
btw, I have not tested this and just posted it as it came to my mind :D

M.S. 53 Light Poster
from os import path

PATH = "folder_path/file.txt"
if path.exists(PATH) and path.isfile(PATH):
    print "File does exist"
else:
      print "File doesn't exist!"
Gribouillis commented: best method +13
M.S. 53 Light Poster

as pyTony said, It only finds the cells containing "CYP", and ignores the cells containing "Cyp"

M.S. 53 Light Poster

PyScripter is the best one in my opinion. it supports many versions of Python

code.google.com/p/pyscripter/

M.S. 53 Light Poster
def generateNumber(num):
    result = []
    for i in range(num+1):
        result.append(i)
    return result
M.S. 53 Light Poster

it could be much shorter:

#User and Pass files:

userN = open('username.txt', 'r').read()
pasN = open('password.txt', 'r').read()

# First make your Functions and Then Use Them the way you want:

def username():
    pin = raw_input ("Please insert your username: ")
    while True:
        if pin == userN:
            print 'You Did It!'
            break
        else:
            print 'Wrong Username!!!'
            return

def password():
    pin = raw_input ("Please insert your password number: ")
    while True:
        if pin == pasN:
            print 'Correct!\nNow Enter Username'
            username()
            break
        else:
            print 'Wrong Password!!!'
            return

password()
M.S. 53 Light Poster

oh sorry I didnt noticed the space(" " instead of "") char in newMessage's default value.
I corrected it and its OK now.

M.S. 53 Light Poster

Also that "+=" what is that? We have not covered this at all. Is there another way of possibly doing it without using this.

that "+=" means add something to original variable.
You can use something like this: newMessage = newMessage + (str(encoded) + " ")

a = "Hello"
a+=" World"
print a

#is the same with:

a = "Hello"
b = " World"
a = a + b

print a

But as I said Lets wait for masters' reply

M.S. 53 Light Poster

Let's wait for masters to give you a more efficient Hint.
but for now this works for me:

#declare and initialize variables
#string message
newMessage = "" # why three variables
#Intro

print(",---.                   |              ,---.                              ")
print("|--- ,---.,---.,---.,---|,---.,---.    |---',---.,---.,---.,---.,---.,-.-.")
print("|    |   ||    |   ||   ||---'|        |    |    |   ||   ||    ,---|| | |")
print("`---'`   '`---'`---'`---'`---'`        `    `    `---'`---|`    `---^` ' '")
print("                                                      `---'               ")


#Prompt the user for the message
message = raw_input("Please enter the message you would like to encode: ")# Or just input in python 3.x

#Loop through message
for ch in message:
    encoded = ord(ch)* 6 - 5
    newMessage += str(encoded)+ " "

#Print and calculate the new value of message
print(newMessage)

#Open a the file “encryptedmessage.txt”
outfile = open("encryptedmessage.txt", "w")

#Write to file “encryptedmessage.txt”
outfile.write(newMessage)

#Close the file
outfile.close()
M.S. 53 Light Poster

A hint:
(Im a newbie too:D)

message = raw_input('Enter Message:')

newMessage = ''
for char in message:
    crypted = ord(char)
    newMessage += str(crypted)

outfile = open('CryptedMessage.txt', 'w')
outfile.write(newMessage)
outfile.close()
M.S. 53 Light Poster

for the other part of your question:

word = raw_input('word: ')
word.split()
print '*'.join(word)+'*'

#>>> H*E*L*L*O*
M.S. 53 Light Poster

maybe something like this:

porttype = "Gi"
print "sh int counters errors | i %s.*/1 " % porttype

>>> sh int counters errors | i Gi.*/1
JoshuaBurleson commented: You were correct. +4