Python: Commands Flashcards

1
Q

print

A

prints text to screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

x = raw_input(“…”)

A

takes input from user and sets variable ‘x’ to that input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

int(raw_input())

A

turns raw_input() into an integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

from sys import argv

A

imports list ‘argv’ from object ‘sys’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

formatter

A

transfer an abstract flow of events into specific output events

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

open(name[, mode[, buffering]])

A

makes file object available to python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

file.write(“…”)

A

writes lines to file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

file.close()

A

closes file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

file.read()

A

prints file to screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly