Support Forums

Full Version: Some Fuctions And What They Do
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
open("file.txt", "w")
Opens a file with text reading to be written to it Common use: x = open("file.txt", "w")

raw_input("Text")
Takes input from user. Common use: x = raw_input("")

x.write(Text)
Write text to what ever file x opens. Commonly used with: x = open("file.txt", "w")

input("Text")
Takes input from user. Common use: x = input("")

print "Text"
Displays text

+, -, *, /
Addition, Subtraction, Multiplication, Division

Import module
imports a module. Common Use: import random

random.choice(a)
Choose a random quote or variable from a string. Commonly used with a = ['1','2']

range(a,b,c)
Displays numbers a through b counting by c. Common use for i in range(y,z,x):

/n
Makes a new line

os.system("clear")
Clears the terminal. Commonly used with: import os
I think you should explain the difference between input and raw_input.
Nice, anyways.