Skip to content

Commit 418a6b8

Browse files
zchilton1ldko
andauthored
01-intro.md: New fundamentals exercise (#766)
* Added an exaple to Python Fundamentals that shows variable data types * Fixed typo in new example * removed exercise name line to generalize section * Added exercise title back and removed the type() calls in the problem statement * added type() calls to Seeing Data Types solution section * Separates Python code and output Co-authored-by: Lauren Ko <[email protected]>
1 parent 788c8ac commit 418a6b8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

_episodes/01-intro.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,32 @@ stuck on it](../fig/python-sticky-note-variables-03.svg)
282282
> {: .solution}
283283
{: .challenge}
284284
285+
> ## Seeing Data Types
286+
>
287+
> What are the data types of the following variables?
288+
>
289+
> ~~~
290+
> planet = 'Earth'
291+
> apples = 5
292+
> distance = 10.5
293+
> ~~~
294+
> {: .language-python}
295+
>
296+
> > ## Solution
297+
> > ~~~
298+
> > type(planet)
299+
> > type(apples)
300+
> > type(distance)
301+
> > ~~~
302+
> > {: .language-python}
303+
> >
304+
> > ~~~
305+
> > <class 'str'>
306+
> > <class 'int'>
307+
> > <class 'float'>
308+
> > ~~~
309+
> > {: .output}
310+
> {: .solution}
311+
{: .challenge}
312+
285313
{% include links.md %}

0 commit comments

Comments
 (0)