Answer:
- def getLargest(number_list):
- new_list = []
-
- for x in number_list:
- if(isinstance(x, int)):
- new_list.append(x)
-
- largest = max(new_list)
-
- return largest
Explanation:
Firstly, create a function <em>getLargest()</em> that take one input parameter, <em>number_list</em>.
The function will filter out the float type number from the list by using <em>isinstance() </em>method (Line 5). This method will check if a current x value is an integer. If so, the x value will be added to <em>new_list</em>.
Next, use Python built-in <em>max</em> function to get the largest integer from the <em>new_list </em>and return it as output.
Answer: Internet Protocal (IP)
Answer:
The statement in Python is:
print("The average pH of citrus fruits is ",avg_citrus_pH)
Java
System.out.print("The average pH of citrus fruits is "+avg_citrus_pH);
C++
cout<<"The average pH of citrus fruits is "<<avg_citrus_pH;
Explanation:
The programming language is not stated; so, I answered the question in 3 languages (Python, Java and C++)
Assume that avg_citrus_pH has been declared and initialized; all you need to do is invoke a print statement and then append the variable
In Python, use print()
In c++, use cout<<
In Java, use System.out.print()
So, the statements are:
Python:
print("The average pH of citrus fruits is ",avg_citrus_pH)
Java
System.out.print("The average pH of citrus fruits is "+avg_citrus_pH);
C++
cout<<"The average pH of citrus fruits is "<<avg_citrus_pH;
CTRL+P. It's usually pressed when you want to print something.