Using the knowledge of computational language in python it is possible to write a code that program that determines when the number of people.
<h3>Writting the code:</h3>
<em> public static void main(String[] args) {</em>
<em> Scanner scnr = new Scanner(System.in);</em>
<em> int maxNumPeople = 10;</em>
<em> int totalNumPeople = 0;</em>
<em> while (totalNumPeople < maxNumPeople) {</em>
<em> if (totalNumPeople < 0) {</em>
<em> totalNumPeople = 0;// we are using line number 10 to check is the total number is less than zero if yes then assign totla number to 0</em>
<em> }</em>
<em> try//we are using line number 8 </em>
<em> {</em>
<em> totalNumPeople += scnr.nextInt();//line number 11 to get the number from user and add it to total number</em>
<em> System.out.println("Occupancy: " + totalNumPeople);//using line 3 to display the number of occupants</em>
<em> } catch (InputMismatchException e)//using line number 1</em>
<em> {</em>
<em> scnr.next();//use line 4 to discard the single string</em>
<em> totalNumPeople += scnr.nextInt();//get the next int</em>
<em> System.out.println("Occupancy: " + totalNumPeople);</em>
<em> }</em>
<em> }</em>
<em> System.out.println("We're full!");</em>
<em />
<em> }</em>
See more about python at brainly.com/question/18502436
#SPJ1