# Program with Dictionary
# Create a dictionary of words and their meanings
dictionary = {
"apple": "a fruit that grows on trees and is typically red or green",
"car": "a four-wheeled motor vehicle used for transportation",
"computer": "an electronic device that processes and stores data",
"dog": "a domesticated mammal often kept as a pet",
"python": "a high-level programming language",
"cat": "a small domesticated carnivorous mammal",
"book": "a written or printed work consisting of pages glued or sewn together along one side",
"house": "a building for human habitation",
"music": "vocal or instrumental sounds (or both) combined in such a way as to produce beauty of form, harmony, and expression of emotion",
"friend": "a person whom one knows and with whom one has a bond of mutual affection",
"beach": "a pebbly or sandy shore, especially by the ocean between high- and low-water marks",
"sun": "the star around which the earth orbits",
"moon": "the natural satellite of the earth, visible (chiefly at night) by reflected light from the sun",
"flower": "the seed-bearing part of a plant, consisting of reproductive organs (stamens and carpels) that are typically surrounded by a brightly colored corolla",
"bicycle": "a vehicle with two wheels that is propelled by pedals and steered with handlebars",
"ocean": "a very large expanse of sea, in particular, each of the main areas into which the sea is divided geographically",
"bookstore": "a store where books are sold",
"school": "an institution for educating children",
"teacher": "a person who teaches, especially in a school",
"student": "a person who is studying at a school or college",
"restaurant": "a place where people pay to sit and eat meals that are cooked and served on the premises",
"movie": "a story or event recorded by a camera as a set of moving images and shown in a theater or on television; a motion picture",
"guitar": "a stringed musical instrument with a fretted fingerboard, typically incurved sides, and six or twelve strings",
"computer science": "the study of computers and computing technologies",
"football": "a ball used in football, either oval (as in American football) or round (as in soccer), typically made of leather or plastic and filled with compressed air",
"pizza": "a dish of Italian origin consisting of a flat, round base of dough baked with a topping of tomato sauce and cheese, typically with added meat or vegetables",
"space": "a continuous area or expanse that is free, available, or unoccupied",
"universe": "all existing matter, space, and time considered as a whole; the cosmos",
"tree": "a woody perennial plant, typically having a single stem or trunk growing to a considerable height and bearing lateral branches at some distance from the ground",
"happiness": "the state of being happy",
"sadness": "the quality of being sad; sorrow",
"love": "an intense feeling of deep affection",
"hate": "feel intense or passionate dislike for someone",
"freedom": "the power or right to act, speak, or think as one wants without hindrance or restraint",
"government": "the governing body of a nation, state, or community",
"oxygen": "a chemical element with the symbol O and atomic number 8",
"hydrogen": "a colorless, odorless, highly flammable gas",
"education": "the process of receiving or giving systematic instruction, especially at a school or university",
"library": "a building or room containing collections of books, periodicals, and sometimes films and recorded music for use or borrowing by the public or the members of an institution",
"movie theater": "a place where movies are shown to an audience on a big screen",
"beauty": "a combination of qualities, such as shape, color, or form, that pleases the aesthetic senses, especially the sight",
"friendship": "the emotions or conduct of friends; the state of being friends",
"laughter": "the action or sound of laughing",
"peace": "freedom from disturbance; tranquility",
"war": "a state of armed conflict between different nations or states or different groups within a nation or state",
"oceanography": "the branch of science that deals with the physical and biological properties and phenomena of the sea",
"chemistry": "the branch of science that deals with the identification of the substances of which matter is composed; the investigation of their properties and the ways in which they interact, combine, and change; and the use of these processes to form new substances",
"biology": "the scientific study of living organisms and their interactions with each other and their environments",
"history": "the study of past events, particularly in human affairs",
"geography": "the study of the physical features of the earth and its atmosphere, and of human activity as it affects and is affected by these, including the distribution of populations and resources, land use, and industries",
"physics": "the branch of science concerned with the nature and properties of matter and energy",
"astronomy": "the branch of science that deals with celestial objects, space, and the physical universe as a whole",
"mathematics": "the abstract science of number, quantity, and space, either as abstract concepts (pure mathematics), or as applied to other disciplines such as physics and engineering (applied mathematics)",
"chemistry": "the branch of science that deals with the identification of the substances of which matter is composed; the investigation of their properties and the ways in which they interact, combine, and change; and the use of these processes to form new substances",
"biology": "the scientific study of living organisms and their interactions with each other and their environments",
"history": "the study of past events, particularly in human affairs",
"geography": "the study of the physical features of the earth and its atmosphere, and of human activity as it affects and is affected by these, including the distribution of populations and resources, land use, and industries",
"physics": "the branch of science concerned with the nature and properties of matter and energy",
"astronomy": "the branch of science that deals with celestial objects, space, and the physical universe as a whole",
"mathematics": "the abstract science of number, quantity, and space, either as abstract concepts (pure mathematics), or as applied to other disciplines such as physics and engineering (applied mathematics)",
"chemistry": "the branch of science that deals with the identification of the substances of which matter is composed; the investigation of their properties and the ways in which they interact, combine, and change; and the use of these processes to form new substances",
"biology": "the scientific study of living organisms and their interactions with each other and their environments",
"history": "the study of past events, particularly in human affairs",
"geography": "the study of the physical features of the earth and its atmosphere, and of human activity as it affects and is affected by these, including the distribution of populations and resources, land use, and industries",
"physics": "the branch of science concerned with the nature and properties of matter and energy",
"astronomy": "the branch of science that deals with celestial objects, space, and the physical universe as a whole",
"mathematics": "the abstract science of number, quantity, and space, either as abstract concepts (pure mathematics), or as applied to other disciplines such as physics and engineering (applied mathematics)",
"chemistry": "the branch of science that deals with the identification of the substances of which matter is composed; the investigation of their properties and the ways in which they interact, combine, and change; and the use of these processes to form new substances",
"biology": "the scientific study of living organisms and their interactions with each other and their environments",
"history": "the study of past events, particularly in human affairs",
"geography": "the study of the physical features of the earth and its atmosphere, and of human activity as it affects and is affected by these, including the distribution of populations and resources, land use, and industries",
"physics": "the branch of science concerned with the nature and properties of matter and energy",
"astronomy": "the branch of science that deals with celestial objects, space, and the physical universe as a whole",
"mathematics": "the abstract science of number, quantity, and space, either as abstract concepts (pure mathematics), or as applied to other disciplines such as physics and engineering (applied mathematics)",
}
# Define a function to look up word meanings
def lookup_word(word):
return dictionary.get(word.lower(), "Sorry, we don't have this word in our dictionary yet!")
# Interactive loop
while True:
print("\nInteractive Dictionary")
print("Enter a word to look up its meaning (type 'exit' to quit):")
user_input = input("> ").lower().strip() # Convert user input to lowercase for case-insensitive lookup
if user_input == 'exit':
print("Thanks for using this, bye!")
break
meaning = lookup_word(user_input)
print(f"Meaning: {meaning}")