The one-stop spot for beginners.

Given an integer, n, print its first 10 multiples. Each multiple n x i(where 1≤i≤10) should be printed on a new line in the form: n x i = result.

We know that we have to create a for loop with the given range of 1 to 10.

The one-stop spot for beginners.

Write a Person class with an instance variable, age, and a constructor that takes an integer, initialAge, as a parameter. The constructor must assign initialAge to age after confirming the argument passed as initialAge is not negative; if a negative argument is passed as initialAge, the constructor should set age to 0 and print Age is not valid, setting age to 0.. In addition, you must write the following instance methods:

  1. yearPasses() should increase the instance variable by 1.
  2. amIOld() should perform the following conditional actions:
  • If age<13, print You are young..
  • If age≥13…

The one-stop spot for beginners.

Day 3: Intro to Conditional Statements

Given an integer, n, perform the following conditional actions:

  • If n is odd, print Weird
  • If n is even and in the inclusive range of 2 to 5, print Not Weird
  • If n is even and in the inclusive range of 6 to 20, print Weird
  • If n is even and greater than 20, print Not Weird

Complete the stub code provided in your editor to print whether or not n is weird.


The one-stop spot for beginners.

Day 2: Operators

Given the meal price (base cost of a meal), tip percent (the percentage of the meal price being added as tip), and tax percent (the percentage of the meal price being added as tax) for a meal, find and print the meal’s total cost. Round the result to the nearest integer.

Function Description
Complete the solve function in the editor below.

Solve has the following parameters:

  • int meal_cost: the cost of food before tip and tax
  • int tip_percent: the tip percentage
  • int tax_percent: the tax percentage

Returns The function returns nothing. Print the calculated…

The one-stop spot for beginners.

Day 1: Data Types

Complete the code in the editor below. The variables i, d, and s are already declared and initialized for you. You must:

  1. Declare 3 variables: one of type int, one of type double, and one of type String.
  2. Read 3 lines of input from stdin (according to the sequence given in the Input Format section below) and initialize your 3 variables.
  3. Use the + operator to perform the following operations:
  4. Print the sum of i plus your int variable on a new line.
  5. Print the sum of d plus your double variable to a…

Photo by Michael Benz on Unsplash

What is Random Forest?

Random Forest is an algorithm that consists of many decision trees using random subsets of features that average the outcome to make predictions.

What is a Decision Tree?

Decision trees are like a flowchart structure where an internal node represents a feature or attribute and the branch represents a decision rule.

A walkthrough of my Zillow Scraper using Beautiful Soup.

What is Beautiful Soup?

Beautiful Soup is a Python library that retrieves data out of HTML, XML, and other markup languages. If you ever had a Myspace, Tumblr, or WordPress you have probably seen or know a thing or two about HTML. It’s a markup language that helps create the structure of a webpage. When scraping information from Zillow we don’t necessarily need all the markup annotations and information so Beautiful Soup helps us extract data without all the excess information.

I created a class labeled ZillowScraper and within the class…

What is GitHub? How do you use GitHub? Why should you have a GitHub? Are you new to the data world? If you stick around long enough you’ll hear about GitHub one way or another.

GitHub is a popular platform used by many developers to collaborate and control different versions of your project. It helps enhance efficiency when working on projects with multiple team members from anywhere in the world! It allows you to merge, edit, and add different changes to files on a project.

I’ll be going over simple jargon and reviewing the format of GitHub and how to…

Learning to code is like learning a new language. The easiest way I have found to learn to code is to use the same concepts as someone learning a new language. It can be overwhelming at first but if you break it down into simple steps it’s a lot easier to achieve than it seems!

Some of the most popular programming languages include Python, Java, JavaScript, C++, PHP, and many more. So, what’s the best and most practical way to learn a new language?

  1. Expose yourself: Some would say watching a show or being around people that speak that particular…

Growing up in a stereotypical Asian American household. I was only exposed to a handful of careers to pursue. Regardless of my talents or interests becoming a doctor, pharmacist, lawyer, or business owner seemed to be the only practical career choices out there (according to my parents). I started watching medical documentaries every weekend in second grade with my mom as it fascinated me. The fascination only continued to grow as I made my way through middle school and high school. At the young age of 7 years old I made the decision to pursue medicine and that’s where my…

Susanna Han

An advocate of everything efficient.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store