Challenge: Formatting Strings

Test yourself and implement what you have learned so far in this challenge.

Problem Statement

You are given a variable quotient which stores the quotient of two numbers. You have to print the result of the quotient in such a way that the output only shows the quotient up to 3 decimal places.


The input is the variable quotient.

quotient has already been declared for you.


The output will be the formatted quotient embedded in a string.

Sample Input

7 / 3

Sample Output

"The quotient is 2.333"

Test Yourself

Write your code in the given area. Try the exercise by yourself first, but if you get stuck, the solution has been provided. Good luck!

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy