Sentinel Loop not exiting

25
February 01, 2019, at 09:00 AM

I'm brand new to coding. I've tried to make sense of other questions that are similar to mine and either they are too advanced and I don't get it, or they aren't the same.

I can't figure out why this won't break out of the loop. No matter what number I put in it just returns the number instead of leaving the loop. I have put this on pythontutor to try and trace it and the menu_item value changes, but it doesn't seem to register with the, "while" boolean.

def display_menu():
  menu_item = 0
  while menu_item > 0 or menu_item < 8:
   choose_item = int(input('Which menu item would you like to input?: '))
   menu_item = int(choose_item)
  print("You selected: ", choose_item)
READ ALSO
DataFrame to CSV creates empty files

DataFrame to CSV creates empty files

I have one large dataframe which I am splitting into multiple smaller dataframes based on a particular column and want to save each of these smaller dataframes as individual csv files

78
CSS java Library

CSS java Library

I hope you doing wellIs there a CSS Java library to recognize whether a CSS String is valid or not? Something like this:

64
Is there a way of optimizing this Java for loop?

Is there a way of optimizing this Java for loop?

I have 2 tables and i merge them together to produce 1 table which i have an indicator column of left and right so i know which file is whichI then run the below code which loops through each of the columns and looks at every cell then compares 2 records...

60
Reading Text From File Into Variables

Reading Text From File Into Variables

I've got a text file formatted like this:

62