Font size
WorksheetsGit_Python
Total questions: 20
Worksheet time: 20mins
What's a shortcut to staging all the changes you have?
git commit add .
git commit .
git add .
git push -am "Message
How do you supply a commit message to a commit?
git message "I'm coding"
git add "I'm coding"
git commit "I'm coding"
git commit -m "I'm coding"
What is the correct commit syntax for all changes with a message?
git message -am "I'm coding"
git add -a "I'm coding"
git commit -a "I'm coding"
git commit -am "I'm coding"
Which command is used to show limited number of commits?
git fetch
git log -n
git config
git status
Git command to compare two specified branches?
git diff
git merge
git blame -L
git push --tags
The git clone command does which of the following?
Makes a local copy of the repository
Creates a working directory
Commits a new branch
Both 1 & 2
Git is a -- ………………… version control system.
Decentralized
Centralized
None of the above
Syntax error in python is detected by _________at _______
compiler/ compile time
interpreter/ run time
compiler/ run time
interpreter/ compile time
Which method is used to convert raw byte data to a string?
Encode()
Decode()
Convert()
tostring()
Analyze the code −
print(''Recursive Function'')
def factorial(n):
return(n*factorial(n-1))
factorial(4)
Recursive Function 24.
Recursive Function.
Function runs infinitely and causes a StackOverflowError.
Syntax Error.
Which operator has higher precedence in the following list
% Modulus
& BitWise AND
**, Exponent
> Comparison
What is the maximum value for an integer in Python 3?
2^63-1
32767
65536
No limit
How do you denote the end of a block in Python 3?
By indenting the next line less than the current
With a semicolon }
With the end keyword
With a backslash \
In the following code, how many objects and references does Python create?
name = ‘Ayushi’
fname = name
One object, one reference
One object, two references
Two objects, one reference
Two objects, two references
According to PEP 8, what case should you use for variable names with more than one word?
Camel case
Pascal case
Snake case
Kebab case
Upper case with snake case
What is the size of an empty tuple in Python?
0 bytes
8 bytes
32 bytes
48 bytes
GIT belongs to the ………………………. Generation of Version Control tools.
2nd
3rd
4th
5th
What language is used in GIT?
C
HTML
PHP
C++
Java
What files is this .gitignore programmed to leave out?
#.swift
build/
*.txt
*.metadata
All files with a .swift, .txt, or metadata file extension, as well as the entire build directory
Only the build directory
All files in the build directory, as well as files ending with .txt or .metadata
Only files with .swift and .txt extensions.
What commands would you use to force an overwrite of your local files with the master branch?
git pull --all
git reset --hard origin/master
git pull -u origin master
git reset --hard master
git pull origin master
git reset --hard origin/myCurrentBranch
git fetch --all
git reset --hard origin/master
