top of page

Lesson 2 Summary

Data Types: Numbers

Data Types: Strings

Concatenation

Conversion

Data Types: Booleans

Checkpoint

Summary

In this lesson, we've learned about four data types (floats, integers, strings, and Booleans), as well as how to concatenate these data types together and convert between them.

​

Let's put everything we've learned together into one final exercise:

1. Look at the following image of the Periodic Table of Elements from PubChem.

Periodic Table of Elements.png

Use the information in the Periodic Table to create 3 variables that can hold 1) the atomic number of an element, 2) the name of the element, and 3) whether or not the element is a noble gas. Then, do the following:

     a) What data type are each of these variables?

     b) Concatenate all variables to print a sentence with information about Hydrogen

     c) Change the values held by your variables to be about Xenon

© 2016 CodeSciLab LLC

bottom of page