1/44
A comprehensive set of question-and-answer flashcards that cover logistics, computing fundamentals, Unix basics, Python syntax, data types, control structures, and real-world scientific applications discussed in Lecture 1 of COMP1005/COMP5005 – Fundamentals of Programming.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Which three assessment components make up the final grade in this unit?
Practical tests (20 %), assignment (40 %), and written exam (40 %).
What minimum score must you achieve on the assignment to pass the unit?
At least 15 % (it is a hurdle requirement).
How long is the final exam and when is it held?
2 hours during the official exam period.
Why is programming considered essential in modern science and engineering?
Because research tasks such as modelling, simulation, data analytics, and visualisation go beyond the capabilities of spreadsheets and require coding.
Name three key uses of computers in scientific work mentioned in the lecture.
Modelling and simulation, data analytics, and visualisation/communication.
Give one reason computer simulation is preferred over real experiments for some problems.
Some problems are too dangerous, too small, too big, or too expensive to test experimentally.
What multidisciplinary areas combine to form Data Science?
Computing, statistics, emerging internet technologies, and media studies.
What term describes the overwhelming growth of digital information highlighted in the ‘Internet Minute’ slide?
The data deluge.
Which real-world project uses more than 50 autonomous cameras to track meteors over 3 million km²?
The Desert Fireball Network.
What programming language is heavily used by the Desert Fireball Network team?
Python.
Define a computer in one sentence as given in the lecture.
A machine that accepts data, processes it, and produces output.
List the four main hardware components of a typical computer.
CPU, input/output devices, dynamic (main) memory, and secondary memory.
How many bits are in one byte?
8 bits.
Convert the decimal number 42 to binary.
42₁₀ = 101010₂.
What role does an operating system play?
It is system software that provides a layer between hardware and applications, making the hardware usable.
Name two mobile or desktop operating systems mentioned in the lecture.
Examples include Windows, macOS, Linux, iOS, Android, Chrome OS.
During which decade were high-level languages like Fortran and COBOL first introduced?
The late 1950s.
Give one advantage and one disadvantage of compiled languages such as C or C++.
Advantage: very fast execution; disadvantage: code is less readable and harder to learn.
List three scientific Python libraries included with Anaconda.
NumPy, SciPy, Matplotlib (others include Pandas and Jupyter).
State two reasons ‘Why Python?’ according to the lecture.
It is easy to learn and comes with a pre-bundled set of scientific modules; it is free and runs on all platforms.
Which major Python version (and sub-version) is used in the unit?
Python 3 (version 3.6.9).
How can you check which Python version is installed from the command line?
Run the command python3 and read the version banner, then type quit() to exit.
What symbol introduces a comment in Python code?
The # character.
Explain the purpose of the input() function in Python.
It prompts the user for input and returns the typed value as a string.
In Python, what is the difference between = and == ?
= is assignment; == is comparison for equality.
Give the Python operator for exponentiation and show an example.
** (e.g., 20 ** 2 evaluates to 400).
Name two values that evaluate to False in a Boolean context besides False itself.
0 (or 0.0), empty string "", empty list [], empty tuple (), empty dict {}, or None.
Write a simple while loop header that repeats until a variable finished becomes True.
while not finished: (followed by indented body).
How do you create a for loop that prints numbers 4 through 9?
for num in range(4, 10): print(num) # prints 4..9
Why are break and continue discouraged in this unit’s coding style?
Curtin Computing style enforces ‘one entry, one exit’ for readability and maintainability, so using break/continue will lose marks.
State the Unix philosophy in one of its three points.
Write programs that do one thing and do it well.
Which open-source operating system variant of Unix is used in the unit’s labs?
Linux.
Provide the general syntax pattern for most Unix commands.
command [option(s)] [filename(s)] (all case-sensitive).
What does the command ls –la do?
Lists the contents of the current directory in long format, including hidden files.
Describe the function of the pipe symbol | in Unix.
It connects the stdout of one command to the stdin of the next command.
Write a Unix command that redirects the output of history into a file called hist.txt.
history > hist.txt
Name two common Unix shells other than bash.
sh (Bourne shell), csh, tcsh, ksh (Korn shell).
What directory symbol represents the single top-level root in Unix file systems?
/ (forward slash).
Give the purpose of the pwd command.
Prints the current working directory.
Which Unix command shows the first ten lines of a file?
head filename (or head [filename]).
What command would you use to view a command’s manual page?
man command_name (e.g., man ls).
Explain the difference between > and >> in Unix redirection.
overwrites/creates a file with stdout; >> appends stdout to the end of an existing file.
Why might a loop become infinite, and how can you stop it from the keyboard?
If its termination condition is never reached; stop with Ctrl-C (or Ctrl-Z to suspend).
List four basic Python numeric, Boolean, or string types introduced in this lecture.
int, float, complex, bool, str.
What built-in Python function returns the data type of a variable?
type()