-
There's no reasonable amount of sleep, the parameters are all dead, can you let the computer know what you want to eat today? These are all extrapolated by big data. If it's homework, it's not that hard.
def sleep(age):
if age<10:
return '8 hours'
else:return '6 hours'
How much sleep you want is up to the writer.
-
This can be calculated using the piecewise function in Python.
-
There are a lot of tables on the Internet to recommend a reasonable amount of sleep based on age, although I don't know if it's scientific.
-
This sleep time is normally distributed.
-
The function implementation should be okay to launch a reasonable sleep time based on age, no problem.
-
Why do you need to design some formulas for these custom functions? As long as the whole framework is designed, and then some reasonable value intervals can be set into it.
-
The custom function is implemented to recommend a reasonable sleep time according to your age, which is to recommend a sleep time that is most suitable for you according to some of your usual sleep habits.
-
Yes, people sleep according to their age, people's sleep is not the same as their age, children need time to sleep, and adults don't need to sleep for so long.
-
Why is the parameter not important, as long as it is called in the function statement block, it is time when it is used.
-
Age = [(current year * 12 + current month * 1) - (year of birth * 12 + month of birth * 1)] 12
Current Year - Year of Birth + (Current Month - Month of Birth) 12
-
There are a few questions here.
1.The line of the first line = This line is wasted. In other words, the first line in the text is not processed.
There is a problem with this line, and a judgment should usually be added.
if not :break
Because, the last line of the text file readline, may be blank.
Your net list[2] is caused by blank lines. So the result of split is 0 in length, empty column, and of course 2 is index out of range.
-
Obviously something went wrong, you can debug what kind of content your new list is printed out; The reason for the error is that the index is longer than your list, 44 look' 'Double quotes are spaces in them, not spaces.
-
Python's built-in module Time has a sleep function in seconds, or you can enter a decimal for milliseconds.
-
Write a class. Leave a variable (fun2 tiime) in the class to record the timestamp of the execution of function 2.
Write an infinite loop function in the class, constantly compare the difference in the current time of the variable (fun2 tiime), and execute function 2 if the difference is greater than 20
-
The fun function has a logical error, so it is changed to:
Note: Each = on the far left represents a space.
def fun(m):
==for i in range(2,m):
*****=if m%i==0:
**********return false====return true
-
You send out the results, isn't it stupid.
private sub command1_click()dim i as integer
dim sum as long >>>More
Look it up and read Zheng Shen's "BC High Cluster Chain Accuracy Respect Function Library". >>>More
Clause. 1. Use graphics software (such as CorelDraw) to make the materials required for dynamic expressions, and export them to jpg format (you can also use the existing ** to combine them yourself). In Photoshop, remove the ** and put it in a folder in order of dynamic expression changes. >>>More
#include
#define m 5 >>>More
The first way: Replace Samsung i9000 system sound files.
Eliminate the sound of taking pictures with your own camera. >>>More