Unit 2 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the data structure table column names?

A
  • field name
  • keyfield
  • data type
  • field length
  • validation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What requirements could there be in a given scenario?

A
  • interface: would a GUI or CLI be more suitable?
  • data structures: Would arrays (short term) or files (long term) be more suitable for storing the data needed?
  • file handling: How should the files be stored? Serially?
  • validation: what fields can you apply what validation techniques to? Specific fields?
  • variables: what are the advantages and disadvantages of local and global variables?
  • data types: How would the user input each data type?

remember to be specific to the scenario and the programming language (python)

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

How do you open a file in python?

A

file = open(“filename.txt”)

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

What parameters can be passed into the “open()” function?

A
  • “x” creates the file
  • “r” opens the file for read only
  • “w” overwrites the file
  • “a” adds to the end of the file
  • “r+” reads and overwrites
  • “a+” reads and adds to a file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly