Answer:
3
Explanation:
int(x)=3
int(x) rounds to the smallest whole number
For example,
if you say int(3.99) it is also 3
Answer:
In Python:
def convert_str_to_numeric_list(teststr):
nums = []
res = teststr.split()
for x in res:
if x.isdecimal():
nums.append(int(x))
else:
nums = []
break;
return nums
def get_avg(mylist):
if not len(mylist) == 0:
total = 0
for i in mylist:
total+=i
ave = total/len(mylist)
else:
ave = "None"
return ave
def get_min(mylist):
if not len(mylist) == 0:
minm = min(mylist)
else:
minm = "None"
return minm
def get_max(mylist):
if not len(mylist) == 0:
maxm = max(mylist)
else:
maxm = "None"
return maxm
mystr = input("Enter a string: ")
mylist = convert_str_to_numeric_list(mystr)
print("List: "+str(mylist))
print("Average: "+str(get_avg(mylist)))
print("Minimum: "+str(get_min(mylist)))
print("Maximum: "+str(get_max(mylist)))
Explanation:
<em>See attachment for complete program where I use comment for line by line explanation</em>
Answer:
Ulimit is the correct answer for the above question.
Explanation:
The Linux operating system is a system on which a user can work on multiple programming system. If a user is working on multiple programs then he needs to set the limit for the system resources so that the system can not access so many resources for any particular program and he can able to access multiple programs. For this a user needs to use the Ulimit command which syntax is as follows--
ulimit [-A] (Where A can be any of them (a, b, c, d, e, f, H, i, l, m, n, p, q, r, s, S, t, T, u, v, x) which refers the type of and units of resources.)
The question asked about the command which is used to prevent to use many of the system resources, then the answer is Ulimit command which is described above.
Answer:
There should be a little icon at the bottom of your question box/answer box. It looks like a paper clip. click it and boom
Explanation: