Advertisement
billyboi314

python help!

Mar 31st, 2020
657
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.71 KB | None | 0 0
  1. def menu():
  2.     print("Here is the MENU:")
  3.     print("1) Find the average Global Hunger Index of 5 of the most hungriest countries")
  4.     print("2) Take a Survey")
  5.     print("3) Print research")
  6.     print(" ")
  7.  
  8. def average(lst):
  9.  
  10.  
  11.  
  12.   ans = int(input("Please make a selection (e.g. 1): "))
  13.   countryLst = "Central African Republic, Yemen, Chad, Madagascar, and Zambia"
  14.   if ans == 1:
  15.     print("Selected Option 1")
  16.     print("")
  17.     print("GLOBAL HUNGER INDEX AVERAGE =")
  18.     print(sum(lst) / len(lst))
  19.     print("LIST OF GLOBAL HUNGER INDEXES = ")
  20.     print(lst)
  21.     print("")
  22.   elif ans == 2:
  23.     print("Selected Option 2")
  24.     print("")
  25.     print("Here is the list of the most hungriest countries : " + countryLst + ".")
  26.     surveyResponse = input("What country out of the list above do you think needs the most help?")
  27.     print("You're response was: " + surveyResponse + ".")
  28.     print("Thank you for your answer!")
  29.     print("")
  30.   elif ans == 3:
  31.     print("Selected Option 3")
  32.     print("")
  33.     print("Research Results:")
  34.     print("What are the most remote parts of the world?")
  35.     print("Tristan da Cunha, Motuo, Ittoqqortoormiit, McMurdo Station, and Easter Island to name a few.\n")
  36.     print("What area in the world has the most in need?")
  37.     print("Most countries in Africa and South America. For example: Central African Republic, Yemen, Chad, Madagascar, and Zambia.\n")
  38.     print("What are the basic needs for a country? ")
  39.     print("Food, water, shelter, sanitation, education, healthcare, nutrition, and health services are examples of basic country needs.\n")
  40.   else:
  41.     print("Exit...")
  42.  
  43.  
  44. menu()
  45.  
  46. picked_lst = [53.6,45.9,44.2,41.5, 38.1]
  47.  
  48. average(picked_lst)
  49.  
  50. avg_hunger = 200
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement