0% found this document useful (0 votes)
11 views2 pages

Data Types Homework Assignment

The document is a homework assignment focused on identifying and checking data types in Python. It consists of four parts: identifying data types, writing Python code to check types, creating examples of different data types, and a bonus question about the difference between a number and a string. Students are required to fill in their name and date at the top.

Uploaded by

gowthamimba14
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Data Types Homework Assignment

The document is a homework assignment focused on identifying and checking data types in Python. It consists of four parts: identifying data types, writing Python code to check types, creating examples of different data types, and a bonus question about the difference between a number and a string. Students are required to fill in their name and date at the top.

Uploaded by

gowthamimba14
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Homework: Fun with Data Types

Name: ___________________
Date: ___________________

---

Part 1: Identify the Data Type

For each of the following, write whether it is an int, float, string (str), or boolean (bool).

1. 25 -> _______
2. 3.14 -> _______
3. "Hello World" -> _______
4. True -> _______
5. "10" -> _______
6. 0 -> _______
7. False -> _______
8. 7.5 -> _______

---

Part 2: Check Using Python

Write Python code to check the type of these variables using type().

Example:
# age = 10
# print(type(age))

a=8
b = 2.5
c = "Python"
d = False

---

Part 3: Create Your Own

1. Write one number without decimals and check its type.


2. Write one number with decimals and check its type.
3. Write one text (string) and check its type.
4. Write one True/False value and check its type.

---

Part 4: Bonus Fun Question

Can the number 10 and the text "10" be the same? Why or why not?

You might also like