What Causes a Heart Attack?

Photo by Kaboompics .com on Pexels.com

The heart is a very important organ in your body. The right side of the heart pumps deoxygenated blood from the veins to the lungs, where it gets rid of carbon dioxide and picks up oxygen. Then, the left side of the heart receives oxygenated blood from the lungs and pumps it through the arteries to the rest of the body. But what happens during a heart attack?

Step 1: Coronary Artery Disease

  • Coronary Artery Disease: Plaque builds up in the Coronary Arteries (arteries that surround the heart muscle and provide oxygenated blood to the heart)
  • Angina: The blockage of these Coronary Arteries makes it harder for blood to flow through the artery and into the heart. This is the stage where you start to feel pain.

Step 2: Heart Attack

  • Heart Attack: The plaque cracks, this may cause the blood to clot. This results in the supply of blood getting cut off from the heart. This causes heart tissue to die and since the body is unable to make new heart tissue by itself, it makes scar tissue which ends up weakening the heart

Common heart attack symptoms include:

  • Pain in your back, neck, or jaw
  • Chest Discomfort (i.e. Pressure or pain in chest area lasting longer than a few minutes or going ad then coming back)
  • Shortness of Breath
  • Arm/ Shoulder Pain
  • Showing signs of lightheadedness, weakness, or fainting. Sometimes also showing signs of breaking into a cold sweat

So how can you prevent a heart attack?

How to Prevent a Heart Attack | Everyday Health
  • Don’t smoke (Including use of vapes, E-Cigarretes, cigars, etc.)
  • Reduce your stress levels (i.e. practice yoga, listen to music, walk in nature)
  • Increase sleep time (i.e. set goals for sleep schedules and try to sleep as early as you can)
  • Reduce Cholesterol (i.e. eat foods that lower cholesterol, like avocados, oats, salmon, almonds, berries, and more…)
  • Eat healthy (i.e. make sure your meals consist of fruits and veggies!)
  • Get Excercise (up to at least 30 minutes a day, i.e. walk around your neighborhood, play a sport, go to your local gym)
  • Steady your blood pressure (i.e. Eat green vegetable like spinach, kale, lettuce, etc.)

Why Do We Hiccup?

“Hic”, “Hic”. Right after a sufficient meal at home, you feel the need to hiccup for at least the hundredth time. Or maybe you’re ready for your final football match when these sounds disperse from your body. During these experiences, you wonder, “Why do we hiccup?”

All hiccups originate in the diaphragm, the dome-shaped muscle right below your lungs. The diaphragm regularly contracts as you breathe in to let air into your lungs and breathe out as you let carbon dioxide out of your body.

When you hiccup, it means your diaphragm is irritated. This causes you to spasm and constrains you to suck air into your voice box. This causes your vocal cords to suddenly close, causing you to “hic”.

But what causes the diaphragm to become irritated?

  • Stress/ anxiety
  • Excitement
  • Overeating
  • Eating too quickly
  • Eating really hot/cold foods
  • Eating Spicy foods
  • Alcohol Overdose
  • Excessive intake of Carbonated Beverages
  • Changes in Temperature in the Air
  • Mental/ Emotional Issues
  • Swallowing air while chewing on candy/gum

So now that you know the causes of an irritated diaphragm, you may be wondering, “Hic…””How can I stop my hiccups?”. The methods below are some methods that can be used to stop hiccups:

  • Drinking cold water at a fast pace
  • Eating a teaspoon of sugar
  • Eating a teaspoon of salt
  • Getting frightened
  • Breathing into a paper bag
  • Holding your breath
  • Compressing your chest
  • Pulling on your tongue
  • Pressing your palm
  • Squeezing your nose while intaking water
  • …and more….

How to Draw an n-sided Polygon in Python Using the Turtle Library

# import turtle library
import turtle
# get screen
Window = turtle.Screen()
# name turtle
bob = turtle.Turtle()

# prompt user for num of sides they want their polygon to be
sidesInput = int(input("Enter a number greater than or equal to 3: "))  

# if the user inputed a number less than 3 for the number of sides they want in their polygon, print ERROR because a polygon cannot have less than 3 sides
if sidesInput < 3 :
    print('ERROR')

# initialize variables    
i = 0
forward = ''
left = ''

# using a while-loop
while i in range (sidesInput):
# make forward variable equal to 100
    forward = 100
# make left variable 360 degrees divided by the number of sides inputed by user to get the angle at which to rotate to make the figure
    left = 360/sidesInput
# while condition- make i = i + 1 
    i += 1
  
# turtle 
# make bob go forward by forward variable 
    bob.forward(forward)
# make bob go left by left variable 
    bob.left(left)

Fibonacci Sequence Using Methods in Java

import java.util.Scanner;

/* AniBlogger12
 * Methods 
 */
public class methods7 {
	// method for returning fibonacci sequence
	public static int fibonacci(int num) {
		// if the number is 0, return 0
		if (num == 0) {
			return 0;
			// or else if the number is 1, return 1
		} else if (num == 1) {
			return 1;
			// else return the sum of the 2 last numbers to get the next term in the
			// sequence
		} else {
			return fibonacci(num - 1) + fibonacci(num - 2);
		}
	}

	// main
	public static void main(String[] args) {
		// get keyboard
		Scanner kb = new Scanner(System.in);
		// prompt user
		System.out.println("Please enter the number of terms you want to display the fibonacci series:");
		// user input
		int num = kb.nextInt();
		// result variable
		int result = 0;
		// for loop
		for (int i = 0; i < num; i++) {
			// result is equal to the fibonacci of (i)
			result = fibonacci(i);
			// print out result
			System.out.println(result);
		}

	}
}

Binary Addition

import java.util.Scanner;

/*AniBlogger12
 * Binary Addition Program
 */
public class binaryAddition {

	public static void main(String[] args) {
		// get keyboard
		Scanner keyboard = new Scanner(System.in);
		// prompt user
		System.out.println("Enter a binary number.");
		// user integer number input
		int num1 = keyboard.nextInt();
		// convert the int number to a string
		String number1 = Integer.toString(num1);
		// make length variable and set it equal to the length of the number entered
		int length1 = number1.length();
		// prompt user asking for another binary number
		System.out.println("Enter another binary number.");
		// user input for another binary number
		int num2 = keyboard.nextInt();
		// convert the int number to a string
		String number2 = Integer.toString(num2);
		// make length variable and set it equal to the length of the number entered
		int length2 = number2.length();
		// add the two binary numbers like adding normal numbers
		int add = num1 + num2;
		// convert sum to a string (this is not the answer)
		String notanswer = Integer.toString(add);
		// add a zero to the string variable
		notanswer = "0" + notanswer;
		// find length of this
		int length = notanswer.length();
		// make a string digit variable
		String digit = "";
		// make an answer variable
		String answer = "";
		// make and initialize a carry variable
		int carry = 0;
		// if the length of the first num is greater than the length of the second num
		if (length1 > length2) {
			// for loop
			// iterate forward
			for (int i = 0; i <= length1; i++) {
				// take part of the digit from length - i - 1th position to length -ith position
				digit = notanswer.substring(length - i - 1, length - i);
				// if first digit is 0 and there is nothing to carry over
				if (digit.equals("0") && carry == 0) {
					// add a 0 to the answer
					answer = "0" + answer;
					// carry stays 0
					carry = 0;

				}
				// or else if the first digit is 0 and carry is 1
				else if (digit.equals("0") && carry == 1) {
					// add 1 to the answer
					answer = "1" + answer;
					// carry becomes 0
					carry = 0;

				}
				// or else if the first digit is 1 and carry is 0
				else if (digit.equals("1") && carry == 0) {
					// add 1 to the answer
					answer = "1" + answer;
					// carry over 0
					carry = 0;

				}
				// else if the first digit is 1 and carry is 1
				else if (digit.equals("1") && carry == 1) {
					// add 0 to answer
					answer = "0" + answer;
					// carry over 1
					carry = 1;

				}
				// else if the first digit is 2 and carry is 0
				else if (digit.equals("2") && carry == 0) {
					// add 0
					answer = "0" + answer;
					// carry over 1
					carry = 1;

				}
				// else if the first digit is 2 and carry is 1
				else if (digit.equals("2") && carry == 1) {
					// add 1 to answer
					answer = "1" + answer;
					// carry over 1
					carry = 1;

				}

			}

		}
		// or else
		// if first number is smaller than second number
		else if (length1 < length2) {
			// for-loop
			for (int i = 0; i <= length2; i++) {
				// same as last time
				digit = notanswer.substring(length - i - 1, length - i);
				// same as before
				if (digit.equals("0") && carry == 0) {

					answer = "0" + answer;

					carry = 0;

				}

				else if (digit.equals("0") && carry == 1) {

					answer = "1" + answer;

					carry = 0;

				}

				else if (digit.equals("1") && carry == 0) {

					answer = "1" + answer;

					carry = 0;

				}

				else if (digit.equals("1") && carry == 1) {

					answer = "0" + answer;

					carry = 1;

				}

				else if (digit.equals("2") && carry == 0) {

					answer = "0" + answer;

					carry = 1;

				}

				else if (digit.equals("2") && carry == 1) {

					answer = "1" + answer;

					carry = 1;

				}

			}

		}
		// or else if both are equal
		else if (length1 == length2) {
			// for-loop
			for (int i = 0; i <= length2; i++) {
				// same as before
				digit = notanswer.substring(length - i - 1, length - i);

				if (digit.equals("0") && carry == 0) {

					answer = "0" + answer;

					carry = 0;

				}

				else if (digit.equals("0") && carry == 1) {

					answer = "1" + answer;

					carry = 0;

				}

				else if (digit.equals("1") && carry == 0) {

					answer = "1" + answer;

					carry = 0;

				}

				else if (digit.equals("1") && carry == 1) {

					answer = "0" + answer;

					carry = 1;

				}

				else if (digit.equals("2") && carry == 0) {

					answer = "0" + answer;

					carry = 1;

				}

				else if (digit.equals("2") && carry == 1) {

					answer = "1" + answer;

					carry = 1;

				}

			}

		}
		// print out the final sum
		System.out.println(answer);

	}

}

Pizza Order – If-Else Statements & Switch Statements

import java.util.Scanner;

/*AniBlogger12
 * Pizza Order
 */
public class PO {
// main
	public static void main(String[] args) {
// get keyboard for user input
		Scanner kb = new Scanner(System.in);
// prompt user
		System.out.println("Please enter the size of the pizza (12, 14, or 16 inch)");
// make size variable
		double size = kb.nextDouble();
// prompt user asking for number of toppings
		System.out.println("Please enter the number of toppings");
// user input for number of toppings
		int toppings = kb.nextInt();
// deduct $5.50 away from toppings 
		double newtoppings = toppings - 5.5;
// toppings price variable
		double tprice;
// switch statement
		switch (toppings) {
// first case, no toppings price
		case 0:
			tprice = 0;
			break;
// second case, $2
		case 1:
			tprice = 2;
			break;
// third case, $3
		case 2:
			tprice = 3;
			break;
// if not the above, price is $3 plus $.50 ^ # of toppings
		default:
			tprice = 3 + Math.pow(.50, newtoppings);
		}
// pizza prices for size 12, 14, and 16 pizzas
		double price1 = 9.00;
		double price2 = 11.00;
		double price3 = 14.00;
// if the pizza size is 12, add $9.00 to the toppings price and print out
		if (size == 12) {
			price1 += tprice;
			System.out.println("The cost of the pizza is " + price1);
		}
// if the pizza size is 14, add $11.00 to the toppings price and print out
		if (size == 14) {
			price2 += tprice;
			System.out.println("The cost of the pizza is " + price2);
		}
// if the pizza size is 16, add $14.00 to the toppings price and print out
		if (size == 16) {
			price3 += tprice;
			System.out.printf("The cost of the pizza is " + price3);

		}
	}

}

Odds and Evens – Arrays

import java.util.Arrays;
import java.util.Scanner;

/*AniBlogger12
 * Odds and Evens- Arrays
 */
public class oddsAndEvens {

	public static void main(String[] args) {
		// get keyboard
		Scanner kb = new Scanner(System.in);
		// initialize array, specify number of integers you want typed
		int[] array = new int[10];
		// prompt user
		System.out.println("Please enter a list");
		// for 10 numbers entered
		for (int i = 0; i < 10; i++) {
			// put it into an array
			array[i] = kb.nextInt();
		}
		// loop through the numbers one by one
		for (int i = 0; i < array.length; i++) {
			//if number is divisible by 2
			if (array[i] % 2 == 0) {
				//it is even and is replaced with 0
				array[i] = 0;
				//or else:
			} else {
				//it is odd and is replaced with 1
				array[i] = 1;
			}
		}
		//print out the new array
		System.out.print("The new array is " + Arrays.toString(array) + "\n");
	}

}

Conversion of Time

import java.util.Scanner;

/* AniBlogger12
 * Program to convert elapsed time in the form of hours, minutes, seconds to seconds. 
 */
public class TP {

	public static void main(String[] args) {
		Scanner keyboard = new Scanner(System.in);
		System.out.println("Please enter the time as three integers: hours, minutes, and seconds");
// Define hours, minutes, and seconds	
		int hours = keyboard.nextInt();
		int minutes = keyboard.nextInt();
		int seconds = keyboard.nextInt();
//Convert hours to seconds: hours*3600= seconds
//Convert minutes to seconds: minutes*60=seconds
//Add hours+ minutes+seconds to get total seconds
		int total = hours * 3600 + minutes * 60 + seconds;
		System.out.println(hours + ":" + minutes + ":" + seconds + " elapsed time converts to " + total + " seconds.");
	}

}

Design a site like this with WordPress.com
Get started