import streamlit as st # Streamlit app st.title("Biology English Grammar Helper") st.sidebar.write("Select a tense to learn:") # Tenses and explanations tenses = { 'Present Simple': { 'structure': 'Subject + base form of the verb (third person singular adds "s")', 'use': 'Used for repeated actions, general facts, and habits.', 'examples': [ ("The cell divides to reproduce.", "Describing a general biological process."), ("Water boils at 100 degrees Celsius.", "Stating a scientific fact."), ("A caterpillar becomes a butterfly.", "Describing a natural transformation process."), ("Genes determine eye color.", "Explaining a genetic fact."), ("Plants produce oxygen through photosynthesis.", "Describing a photosynthesis process."), ("Enzymes speed up chemical reactions.", "Explaining the role of enzymes in biology."), ("The Earth revolves around the Sun.", "Describing an astronomical fact relevant to biology."), ("Herbivores eat plants.", "Stating a fact about animal diet."), ("Bacteria reproduce quickly in favorable conditions.", "Describing bacteria reproduction."), ("The heart pumps blood throughout the body.", "Explaining a biological function."), ("Insects play vital roles in ecosystems.", "General statement about biology."), ("DNA carries genetic information.", "Fundamental fact of genetics.") ] }, 'Present Continuous': { 'structure': 'Subject + am/is/are + verb-ing', 'use': 'Used for actions happening right now or currently ongoing actions.', 'examples': [ ("The scientist is observing the cell under a microscope.", "Describing an action happening currently in a lab."), ("The flowers are blooming this season.", "Describing a seasonal process happening now."), ("We are studying the effects of climate change on migration patterns.", "Explaining current research."), ("Bacteria are multiplying under the right conditions.", "Describing a process occurring at the moment."), ("The planet is warming due to global warming.", "Discussing a current global issue."), ("The researcher is analyzing the DNA sample.", "Current activity in a lab."), ("Bees are pollinating the plants.", "Active process in nature."), ("Scientists are debating the new theory.", "Current academic discussion."), ("The doctor is examining the patient now.", "Ongoing medical examination."), ("Students are learning about cellular processes.", "Current educational activity.") ] }, 'Past Simple': { 'structure': 'Subject + past form of the verb', 'use': 'Used for actions completed in the past at a specific time.', 'examples': [ ("The scientist discovered a new species last year.", "Describing a completed action in the past."), ("The dinosaurs roamed the earth millions of years ago.", "Stating a historical fact."), ("Mendel conducted genetic experiments in the 19th century.", "Discussing historical experiments."), ("The patient recovered fully after the treatment.", "Describing a completed health recovery."), ("Researchers isolated the gene in 2001.", "Pointing out the completion of research at a specific time."), ("The lab technician tested the blood sample yesterday.", "Describing an action done in the recent past."), ("Marie Curie discovered radium in 1898.", "Highlighting a significant historical discovery."), ("The medical team successfully performed the surgery last week.", "Stating a completed medical procedure."), ("Scientists identified the virus in the early 20th century.", "Indicating when a scientific discovery was made."), ("The biologist recorded the data before the deadline.", "Stating a completed action with a time reference."), ] }, 'Past Continuous': { 'structure': 'Subject + was/were + verb-ing', 'use': 'Used for actions that were in progress at a specific time in the past.', 'examples': [ ("The scientists were researching new vaccines when the outbreak occurred.", "Describing an ongoing action interrupted by another action."), ("The cells were dividing rapidly under the microscope.", "Describing an ongoing process observed in the past."), ("The biologist was observing the organisms all night.", "Detailing a prolonged action in the past."), ("Researchers were experimenting with the new compound when the accident happened.", "Showing an action interrupted by another."), ("The students were studying when the fire alarm rang.", "An action occurring at a specific past time interrupted by another event."), ("The flowers were blooming throughout the spring season.", "Describing an action that was happening over a period in the past."), ("The nurse was checking the patient's vital signs every hour.", "Indicating a continuous action at a certain time."), ("The deer were grazing in the field at sunset.", "Setting a scene of an ongoing action in the past."), ("Scientists were debating the new theory for hours.", "Showing a prolonged discussion in the past."), ("The professor was explaining the concept when the power went out.", "An ongoing action interrupted by another event."), ] }, 'Future Simple': { 'structure': 'Subject + will + base form of the verb', 'use': 'Used for decisions, promises, predictions, and offers about the future.', 'examples': [ ("The biotech company will release the new drug next year.", "Making a prediction about a future event."), ("I will study the effects of this gene.", "Expressing a future decision."), ("The conference will happen in Geneva next month.", "Announcing a future event."), ("Scientists will discover more about this phenomenon.", "Predicting future scientific discoveries."), ("We will review the test results tomorrow.", "Stating a future action related to data analysis."), ("The government will fund the new research project.", "Predicting future financial support for research."), ("The medical trial will begin next week.", "Announcing the start of a new medical trial."), ("We will publish our findings in the upcoming issue.", "Stating a future action related to academic publication."), ("The student will present her thesis tomorrow.", "Announcing a future academic presentation."), ("They will test the hypothesis in the next phase of the experiment.", "Predicting the next step in research."), ] }, 'Present Perfect': { 'structure': 'Subject + has/have + past participle of the verb', 'use': 'Used for actions or situations that started in the past and continue into the present, or actions completed at an unspecified time.', 'examples': [ ("Researchers have discovered several vaccines for the virus.", "Describing actions completed at an unspecified time."), ("The species has evolved significantly over the last million years.", "A process that started in the past and continues."), ("Scientists have found evidence supporting the new theory.", "Recent discoveries influencing current beliefs."), ("The team has completed the initial phase of the research.", "Completion of part of a longer-term project."), ("Biologists have observed a decrease in biodiversity.", "An ongoing observation starting in the past."), ("We have developed a new method for DNA sequencing.", "Announcing the completion of a development process."), ("Researchers have been investigating the cause of the disease for years.", "An ongoing research effort."), ("The medicine has improved the quality of life for many patients.", "A continuing impact from a past action."), ("Scientists have debated this theory for decades.", "A debate that started in the past and continues."), ("The population has increased significantly due to conservation efforts.", "A result of ongoing efforts."), ] }, 'Past Perfect': { 'structure': 'Subject + had + past participle of the verb', 'use': 'Used for actions that were completed before another action in the past.', 'examples': [ ("By the time the paper was published, the scientist had already started a new project.", "Describing an action completed before another past action."), ("The researchers had finished the experiments before the deadline.", "Completion of one action before another."), ("She had studied biology before she moved to physics.", "Stating a completed action before another in the past."), ("The species had become extinct before the scientific community noticed.", "An event occurring prior to another event."), ("They had synthesized the compound before the reaction occurred.", "Completion of an action before another event."), ("The doctor had seen the symptoms before the diagnosis was confirmed.", "Observing symptoms before making a diagnosis."), ("We had submitted our article before the conference was announced.", "Submitting work before another event."), ("The professor had left the university before the semester ended.", "Leaving an institution before a specific time."), ("The scientist had received the award before the discovery was questioned.", "Receiving recognition before future controversy."), ("The medication had been approved before new side effects were found.", "Approval of medication before new findings emerged."), ] }, 'Future Perfect': { 'structure': 'Subject + will have + past participle of the verb', 'use': 'Used for actions that will be completed before a specific time in the future.', 'examples': [ ("By next year, the biologist will have completed the research.", "Completing future work before a set time."), ("The students will have graduated by the time the new semester starts.", "Completing an education phase before a future date."), ("We will have finished the experiment before the conference.", "Finishing work before a forthcoming event."), ("The technician will have analyzed all samples by tomorrow morning.", "Completing tasks before a future moment."), ("The paper will have been published by the time the meeting occurs.", "Publishing work before a scheduled event."), ("They will have mapped the entire genome by next month.", "Completing a project before a specified time."), ("The new species will have been classified before the year ends.", "Classifying new findings within a timeframe."), ("We will have reviewed all the literature on this topic by next week.", "Completing research before a future date."), ("The project will have reached its fifth year by the end of this decade.", "Reaching a milestone before a future date."), ("The experiment will have run for 24 hours by tomorrow.", "Completing a time-bound experiment."), ] }, 'Present Perfect Continuous': { 'structure': 'Subject + has/have been + verb-ing', 'use': 'Used for actions that began in the past and continue to the present, especially with how long the action has been happening.', 'examples': [ ("Scientists have been studying global warming for decades.", "An ongoing study starting in the past."), ("We have been researching the effects of this drug for over a year.", "Continuous research effort."), ("The biologist has been observing the species since last month.", "Ongoing observation starting in the past."), ("Researchers have been debating this issue for many years.", "A continuous debate that started in the past."), ("The team has been working on the project since 2010.", "Long-term project engagement."), ("I have been teaching biology at the university for five years.", "Long-term teaching engagement."), ("They have been trying to find a cure for this disease for a long time.", "Ongoing medical research."), ("We have been developing new methodologies for data analysis.", "Continuous development of methods."), ("The scientist has been contributing to this field for decades.", "Long-term contributions to a field."), ("She has been studying the migration patterns of these birds for several seasons.", "Ongoing study across different times."), ] }, 'Past Perfect Continuous': { 'structure': 'Subject + had been + verb-ing', 'use': 'Used for actions that were happening before another action or time in the past.', 'examples': [ ("The researcher had been working on the project for five years before it was terminated.", "Ongoing work that ended."), ("They had been studying the phenomenon for several months before the breakthrough.", "Continuous study before a significant discovery."), ("He had been teaching at the university for a decade before he retired.", "Long-term teaching before retirement."), ("The scientists had been researching the area before the funding was cut.", "Ongoing research that was stopped."), ("We had been observing the species for years before the habitat was destroyed.", "Long-term observation ended by an event."), ("The team had been conducting experiments before the lab was closed.", "Ongoing experiments halted by a closure."), ("She had been collecting data before the new regulations were implemented.", "Data collection stopped by new rules."), ("They had been tracking the storm's progress before it changed course.", "Monitoring an event before a change."), ("The doctor had been treating the patient for weeks before the improvement was noted.", "Ongoing treatment before noticing changes."), ("Researchers had been debating the theory before new evidence emerged.", "Ongoing debates halted by new findings."), ] }, 'Future Perfect Continuous': { 'structure': 'Subject + will have been + verb-ing', 'use': 'Used for actions that will continue up until a point in the future.', 'examples': [ ("By next month, the student will have been studying biology for four years.", "Studying up to a future point."), ("The scientists will have been researching the vaccine for over a decade by the time it is released.", "Researching until a future moment."), ("We will have been monitoring the ecosystem for a full year by next spring.", "Monitoring until a certain future time."), ("She will have been working in the field of marine biology for twenty years by 2025.", "Working until a specified future date."), ("They will have been compiling the report for three months by the deadline.", "Compiling a report up to a future deadline."), ("The professor will have been teaching at the university for a quarter of a century by next year.", "Teaching until a future time."), ("Researchers will have been analyzing the data for weeks by the time the conference arrives.", "Analyzing data until a certain event."), ("The conservationists will have been protecting the endangered species for several years by the time the project ends.", "Protecting a species up until a project's conclusion."), ("The students will have been preparing their thesis projects for several months by the time of submission.", "Preparing academic work until submission."), ("The team will have been operating under the new guidelines for two years by the time the review is conducted.", "Operating within guidelines until a review."), ] }, 'Future Continuous': { 'structure': 'Subject + will be + verb-ing', 'use': 'Used for actions that will be happening at a specific time in the future.', 'examples': [ ("The scientist will be presenting her findings at the conference next week.", "Describing an action scheduled in the future."), ("At this time tomorrow, we will be analyzing the DNA samples.", "Specifying an ongoing future activity."), ("The students will be dissecting frogs in biology class tomorrow.", "Stating a planned future activity in an educational setting."), ("By 2050, researchers will be studying new methods of sustainable farming.", "Predicting future ongoing research activities."), ("Next month, the lab will be conducting extensive tests on the new vaccine.", "Outlining scheduled future actions in a lab."), ("During the next eclipse, astronomers will be observing the moon's surface.", "Describing future scientific activities at a specific event."), ("This time next year, I will be working on my thesis on marine biology.", "Describing personal future ongoing activities."), ("Tomorrow at 9 AM, the environmentalists will be cleaning the beach.", "Detailing planned future environmental activities."), ("Next semester, the students will be studying advanced genetics.", "Outlining future academic plans."), ("In the next decade, scientists will be exploring the effects of climate change on Arctic ecosystems.", "Predicting future scientific exploration.") ] }, } # Writing Tips Section def display_writing_tips(): st.subheader("Writing Tips for Biology") st.write(""" Effective writing in biology, like in any scientific discipline, requires clarity, precision, and conciseness. Here are some tips to help you write better in the field of biology: 1. **Use Clear and Direct Language**: Avoid unnecessary jargon and complex language. Explain terms that may not be familiar to all readers. 2. **Be Concise**: Convey your information as succinctly as possible without omitting essential details. Avoid redundancy and unnecessary elaborations. 3. **Use the Active Voice**: While the passive voice is commonly used in scientific writing, the active voice can make your writing clearer and more engaging. For example, write "The researcher conducted the experiment" instead of "The experiment was conducted by the researcher". 4. **Be Specific and Precise**: Use specific terms and be precise with your descriptions and measurements. Avoid vague language that could lead to misinterpretation. 5. **Organize Your Writing**: Start with an introduction to the topic, followed by the body where you present your main points or findings, and conclude with a summary or conclusion. Use headings and subheadings to organize sections. 6. **Cite Your Sources**: Always give credit where it's due. Cite your sources appropriately using a consistent citation style. 7. **Revise and Proofread**: Review your writing for any errors or unclear sections. It can be helpful to have someone else read your work to catch mistakes you may have missed. 8. **Use Visuals Wisely**: Include figures, tables, and diagrams to support your text, but ensure they are clearly labeled and referenced in the text. 9. **Maintain Formality**: Keep a formal tone but avoid being overly verbose. Write as if you are informing a knowledgeable colleague. 10. **Follow the Specific Format Required**: Adhere to the formatting and style guidelines required for your assignment, journal, or other publication. Remember, good writing in biology, as in any field, takes practice. Keep these tips in mind as you work on your biology writing projects. """) # Add a sidebar option to display writing tips if st.sidebar.button('Writing Tips for Biology'): display_writing_tips() tense_selected = None for tense_name in tenses.keys(): if st.sidebar.button(tense_name): tense_selected = tense_name if tense_selected: st.subheader(f"{tense_selected} Tense") tense_info = tenses[tense_selected] st.write(f"**Structure:** {tense_info['structure']}") st.write(f"**Use:** {tense_info['use']}") st.markdown("**Examples:**") for example, explanation in tense_info['examples']: st.write(f"- **{example}**: {explanation}")