Programming Examples: Tokenization, Regular Expressions, Derivation Sequences, and More

Programming Examples


Write a program for tokenization of given input:

input_string = input("Enter the input string: ")
tokens = input_string.split()

Regular Expressions

Write a program for generating regular expressions for regular grammar:

from re import *
list1='Good morning everyone'
list2='Good morning everyone & good afternoon'
if y:
else :
 print('Not matched')
list1='Good morning everyone'

Read More

The Birth of Modern Europe: Nationalism, Revolutions, and Industrialization

Nationalism. The birth of new states/ Nationalist ideas supported processes of unification. This was the case in Italy and Germany, where they contributed to the spread of ideas of building a unified liberal State. Nationalist ideas also helped lead to the fall of the Ottoman Empire and the rise of new States. 8.1 The unification of Italy (1859-1870) The process of unification was directed by the Kingdom of Piedmont- Sardinia. Central figures were Victor Emmanuel Il and Prime Minister Cavour, who

Read More

Concrete and Bitumen Properties in Construction

Concrete Properties


Numbness is the increase in the volume of sand or concrete over time due to water absorption. It is greater with finer sand or cement particles.

Table of Shock

This test measures the increase in diameter of a truncated cone’s lower base when subjected to 15 shocks (12 mm high for 15 seconds). The consistency index determines the following:

  • 0-30: Dry
  • 30-50: Plastic
  • 50-70: Soft
  • 70-100: Fluid
  • >100: Liquid

Consistometer of Vebe

Useful for very dry or fiber-reinforced concrete, this

Read More

The Tiger King: Analysis, Character Sketch, and Irony

Q. Why does the Tiger King get his name?

Ans: He killed about seventy tigers within ten years. He was so caught up with reaching his target of killing one hundred tigers to disprove the prophecy that all other matters took a back-seat. This was how he got to be known as the Tiger King.

Q. What did astrologers foretell when the Tiger King was born?

Ans: When the Tiger King was born, astrologers said he would die because of a tiger. They predicted that a tiger would be the cause of his death, which made

Read More

Qualities of a True Friend: The Value of Friendship

Friendship is an interesting kind of love. There’s no contract legally binding you two together, there’s no unspoken rule about loving each other unconditionally, and there’s no real binding commitment to the opposite person other than what you are willing to put in to the relationship.

But maybe these are the reasons why our friendships are so valuable. The option is always there to back out at any time, and yet, with the really, really authentic ones, we never do.

Because at the end of the day –

Read More

The Sex-Gender Distinction in Feminist Thought

1. The Sex-Gender Distinction and Feminist Consciousness

The distinction between sex and gender is key to the advancement of feminist consciousness. Several feminist authors have elaborated on this distinction, while others have questioned its importance.

Authors Who Emphasize the Distinction

Mary Wollstonecraft, in her seminal work A Vindication of the Rights of Woman, argued that women should be treated as human beings first and foremost. She suggested that gendered behavior was learned through education

Read More

Health and Environmental Issues: A Comprehensive Guide

Air Pollution

The term “air pollution” is defined as the presence in the ambient (surrounding) atmosphere of s substances (e.g., gases, mixtures of gases and particulate matter) generated by the activities of man in concentrations that interfere with human health, safety or comfort, or injurious to vegetation and animals and other environmental media resulting in chemicals entering the food chain or being present in drinking-water and thereby constituting additional source of human exposure.


Read More

Comprehensive Guide to Microbiology, Health, and Disease


Microbiology is the study of microorganisms, which are single-celled or cell-cluster organisms. These microorganisms include bacteria, archaea, fungi, algae, protozoa, and helminths.

Common Micro-organisms of Microbiology

Microbiology encompasses a diverse group of microscopic organisms that exist as single cells, including bacteria, archaea, fungi, algae, protozoa, and helminths. Some specific examples include:

  • Moulds: Moulds such as Mucor, Rhizopus, Botrytis, Aspergillus, and Penicillium
Read More

A Geopolitical Overview: From the End of the Cold War to the Present

The Post-Cold War World

The fall of the Berlin Wall in 1989 and the collapse of the USSR marked the end of the Cold War, establishing a new world order led by the United States. Under Presidents Reagan and Bush Sr., the U.S. intensified the Cold War and then saw its conclusion, increasing military interventions in the 1990s. Under President Bush Jr., the wars in Afghanistan and Iraq followed the September 11 attacks, culminating in the 2008 financial crisis. President Obama withdrew troops but faced

Read More

Measurement Scales, Statistical Concepts, and Research Methods in Social Sciences

Measurement Scales

Likert Scales

An ordinal level measurement of a person’s attitude, typically using a 5-7 point scale, allowing participants to indicate how much they agree or disagree with a statement. This method assumes that attitudes can be measured and ranked. It uses ordinal data with two extreme points and a neutral point, making it simple to complete.

Continuous Measurement Scale

Allows for fractional amounts/decimals, which make sense in this context.

Discrete Scale

Only fixed amounts can be

Read More