🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Multiple Choice Quiz.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Transcript

### Multiple Choice Quiz: Basic R Programming, Linux, and Git #### Section 1: Basic R Programming Theoretical Questions 1. **Question:** What function in R would you use to combine multiple elements into a vector? - A) `c()` - B) `combine()` - C) `concat()` - D) `vector()` **Answer:** A)...

### Multiple Choice Quiz: Basic R Programming, Linux, and Git #### Section 1: Basic R Programming Theoretical Questions 1. **Question:** What function in R would you use to combine multiple elements into a vector? - A) `c()` - B) `combine()` - C) `concat()` - D) `vector()` **Answer:** A) `c()` 2. **Question:** How do you read a CSV file into R? - A) `read.csv(file)` - B) `readFile(file)` - C) `open.csv(file)` - D) `load.csv(file)` **Answer:** A) `read.csv(file)` 3. **Question:** What function is used to install packages in R? - A) `install()` - B) `install.packages()` - C) `load.packages()` - D) `library()` **Answer:** B) `install.packages()` 4. **Question:** Which function in R returns the structure of an object? - A) `summary()` - B) `structure()` - C) `str()` - D) `info()` **Answer:** C) `str()` 5. **Question:** How do you create a data frame in R? - A) `data.frame()` - B) `data()` - C) `frame()` - D) `df()` **Answer:** A) `data.frame()` #### Section 2: Linux Theoretical Questions 6. **Question:** Which command lists all files, including hidden ones, in a directory? - A) `ls` - B) `ls -a` - C) `ls -l` - D) `ls -al` **Answer:** D) `ls -al` 7. **Question:** What is the command to change the permissions of a file? - A) `chmod` - B) `chperm` - C) `chown` - D) `perm` **Answer:** A) `chmod` 8. **Question:** How do you display the contents of a file in Linux? - A) `cat` - B) `show` - C) `display` - D) `open` **Answer:** A) `cat` 9. **Question:** What command is used to find patterns in files? - A) `find` - B) `search` - C) `grep` - D) `pattern` **Answer:** C) `grep` 10. **Question:** How do you check the current directory you are in? - A) `dir` - B) `pwd` - C) `cd` - D) `ls` **Answer:** B) `pwd` #### Section 3: Git Theoretical Questions 11. **Question:** What command do you use to initialize a new Git repository? - A) `git start` - B) `git init` - C) `git new` - D) `git create` **Answer:** B) `git init` 12. **Question:** How do you clone a repository from GitHub? - A) `git clone url` - B) `git copy url` - C) `git fetch url` - D) `git pull url` **Answer:** A) `git clone url` 13. **Question:** What command stages changes for the next commit? - A) `git stage` - B) `git add` - C) `git commit` - D) `git push` **Answer:** B) `git add` 14. **Question:** How do you view the commit history in Git? - A) `git history` - B) `git log` - C) `git commits` - D) `git list` **Answer:** B) `git log` 15. **Question:** Which command creates a new branch in Git? - A) `git branch new_branch` - B) `git create new_branch` - C) `git new new_branch` - D) `git checkout new_branch` **Answer:** A) `git branch new_branch` #### Section 4: Simple Code Debugging Questions 16. **Question:** What is wrong with the following R code that tries to calculate the mean of a vector? ```r data

Tags

programming R language Linux
Use Quizgecko on...
Browser
Browser