Answer:
employees.get(0)
Explanation:
In the programming, the index of ArrayList start from zero.
So, the element start storing in the ArrayList from the zero index.
get() is the function which is used to retrieve or getting the value in the
ArrayList.
The function employees.get(0), it retrieve the element of zero index.
The function employees.get(1), it retrieve the element of first index.
The function employees.first(1), it is wrong calling.
The function employees.get(), it is wrong calling. you have to enter the index value inside the get().
age,name = input('Enter a string: ').split('.')
print(name+' is '+age+' years old. Length of '+name+' is '+str(len(name)))
I wrote my code in python 3.8. I hope this helps.
Answer:
5,10; 6,12; 7,14
Explanation:
We will demonstrate the iteration of the loop:
First iteration: Number = 7, Count = 5 at the beginning. We will check if Count <= Number? Since it is correct, prints 5,10. Increment the Count by 1.
Second iteration: Number = 7, Count = 6. We will check if Count <= Number? Since it is correct, prints 6,12. Increment the Count by 1.
Third iteration: Number = 7, Count = 7. We will check if Count <= Number? Since it is correct, prints 7,14. Increment the Count by 1.
Forth iteration: Number = 7, Count = 8. We will check if Count <= Number? Since it is not correct, the loop stops.
Answer:
That it is time for lunch?
Explanation: