From abe821bd8e8d5b0f842a2ac0f47482e489b0e28f Mon Sep 17 00:00:00 2001 From: PMB79 <44287599+PMB79@users.noreply.github.com> Date: Sun, 18 Nov 2018 23:34:16 +0000 Subject: [PATCH] Clarification of the numbers that can be used. (#22174) * Clarification of the numbers that can be used. Article previously only explicitly referenced the use of floating point numbers. Have clarified that it is possible to use either an integer or a float. * Fixed formatting and typos --- .../sleep-how-can-i-make-a-time-delay-in-python/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/english/python/sleep-how-can-i-make-a-time-delay-in-python/index.md b/guide/english/python/sleep-how-can-i-make-a-time-delay-in-python/index.md index 20a9d1da31..aa3a499bbc 100644 --- a/guide/english/python/sleep-how-can-i-make-a-time-delay-in-python/index.md +++ b/guide/english/python/sleep-how-can-i-make-a-time-delay-in-python/index.md @@ -15,7 +15,7 @@ for letter in 'hello, world!': time.sleep(2) # sleep 2 seconds between each print ``` -Floating point numbers can be given as the argument to `sleep()` for more precise sleep times. +When using sleep, you can define the amount of time that the program is suspended using either an integer (a whole number) or a float (a number with decimal places), depending on the level of control you want over the time that the program sleeps. For example, `time.sleep(10)` would suspend a program for 10 seconds, while `time.sleep(5.5)` would suspend a program for five and a half seconds. -#### More Information: +#### More Information Time module documentation on the sleep function.