Here is the solution for Hello World | Crash Course on Pyhton by Google, Introduction to Python practice quiz solution. Practice Quiz: Hello World Solution. Google IT Automation with Python Professional Certificate All question and answers are given below
Question 1
What are functions in Python?
1. Functions let us use Python as a calculator.
2. Functions are pieces of code that perform a unit of work.
Correct
Right on! Python functions encapsulate a certain action, like outputting a message to the screen in the case of print().
3. Functions are only used to print messages to the screen.
4. Functions are how we tell if our program is functioning or not.
Practice Quiz Solution : Hello World |
Question 2
What are keywords in Python?
1. Keywords are reserved words that are used to construct instructions.
Correct
You got it! Using the reserved words provided by the language we can construct complex instructions that will make our scripts.
2. Keywords are used to calculate mathematical operations.
3. Keywords are used to print messages like "Hello World!" to the screen.
4. Keywords are the words that we need to memorize to program in Python.
Question 3
What does the print function do in Python?
1. The print function generates PDFs and sends it to the nearest printer.
2. The print function stores values provided by the user.
3. The print function outputs messages to the screen
Correct
You nailed it! Using the print() we can generate output for the user of our programs.
4. The print function calculates mathematical operations.
Question 4
Output a message that says "Programming in Python is fun!" to the screen.
print("Programming in Python is fun!")
Correct
Great work! We're just starting but programming in Python
can indeed be a lot of fun.
Question 5
Replace the ___ placeholder and calculate the Golden ratio: .
Tip: to calculate the square root of a number , you can use x**(1/2).
ratio = (1 + (5 ** (1/2))) / 2
print(ratio)
1.618033988749895
Correct
Awesome job! See how we can use Python to calculate complex
values for us.
No comments:
Post a Comment