avatarLeonid Hass

Summary

This web page provides a beginner-friendly introduction to programming using the Kotlin language, focusing on basic data types such as Int, Double, String, and Bool.

Abstract

The web page titled "Programming for Cats — Part #1" is a beginner-friendly guide to programming using the Kotlin language. The article emphasizes that programming is not as difficult as it may seem and encourages readers to start learning with essential concepts. The tutorial covers basic data types in Kotlin, including Int, Double, String, and Bool, and provides examples of how to use them. The author also includes a bonus section on performing mathematical operations with numbers. The article aims to make programming accessible and enjoyable for beginners.

Bullet points

  • The article is a beginner-friendly guide to programming using the Kotlin language.
  • The author emphasizes that programming is not as difficult as it may seem and encourages readers to start learning with essential concepts.
  • The tutorial covers basic data types in Kotlin, including Int, Double, String, and Bool.
  • The author provides examples of how to use these data types in Kotlin.
  • The article includes a bonus section on performing mathematical operations with numbers.
  • The article aims to make programming accessible and enjoyable for beginners.

Programming for beginners

Programming for Cats — Part #1

You don’t have to be an engineer or person who knows math and physics to write a code and make programs. It ain’t so difficult as you think!

Photo by Sereja Ris on Unsplash

Have you ever been interested in what developers do or talk about between each other? Did you hear such words like functions, classes, variables, etc? Or maybe more difficult like requests, databases, networks, etc.

There are really a lot of words that are too difficult. And must say that you can find such words and expressions that even some well experienced developers won’t understand. By how difficulties and you shouldn’t know everything about it to learn it.

“The secret to getting ahead is getting started.”

― Mark Twain

If you ever start something — you should start with some essentials. Even if you learn some language or something else, learn it from some simple things.

In this tutorial we’ll look at one of the most beautiful and modern languages, that are really friendly for understanding. And because it’s one of my favourites as well.

Also, you can find links for the next parts of this series below.

Kotlin

Photo by jcob nasyr on Unsplash

So, I won’t tell about this language much. From picture above you can see a bit of code, that might seem very friendly and understandable for you. By the way we’ll look at 3 topics at this part of series, such as data types.

Don’t worry, it would be really easy! So, let’s get started!

Data types — Int, Double, String, Bool

Photo by Joshua Sortino on Unsplash

The fundament of any programming languages is variables, that keeps some data and that data has some type. Data types could be simple and difficult. But don’t be afraid. Difficult is mean that it just contains some simple variable inside. By the way let's look at some simplest types and those that have the most often usage in programming life.

Int

Data type that contains integer values like 0, 1, 2, 3… or -1, -2, -3…

Here some usage samples:

So, yes, it’s pretty easy. Let’s look at another data type.

Double

Data type that contains integer and non-integer values like 0.0, 1.5, 2.1, 3.3… or -1.5, -2.1, -3.3…

Here some usage samples:

So, yes, it’s pretty easy. Let’s look at another data type.

String

Data type that contains string values like some plain text.

Here some usage samples:

So, yes, it’s pretty easy. Let’s look at another data type.

Bool

Data type that shows if some event or expression is true of false.

Here some usage samples:

Additional bonus! — Operations with numbers

Photo by Crissy Jarvis on Unsplash

Yes, as we learn above the simplest data types. Here we can also look at some simplest examples what can we do with such a variable. We’ll look at samples with math operations.

And that’s it! Hope you enjoyed this article. I tried to find the most easy programming language and samples to understand. If you have questions or wanna see more put a comment below.

Hope you enjoyed it! Wait for the next part of this series, where we’ll look at something more interesting in the programming world!

Editor’s note-all images that are not from Upsplash were created by the writer via Github as indicated in the lower left of the images.

Programming
Programming Languages
Cats
Technology
It
Recommended from ReadMedium