Skip to content

Commit 5e3dfa3

Browse files
committed
Clarify Float instructions to specify input is a float
1 parent 689f0b0 commit 5e3dfa3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

1_beginner/chapter2/practice/float.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Float
2-
# Write a program that takes a number from the user
2+
# Write a program that takes a float from the user
33
# and stores it in a variable. Cast the number to an
44
# integer and store in another variable.
5-
# Then print: (floating point number) = (integer).
5+
# Then print: (floating point number) = (integer number).
6+
# For example, if the user enters 5, the output would be:
7+
# 5.0 = 5
68
# Also print the type of the floating point variable.
79
# Remember! type(variable_name) will return the data type of a variable
810

1_beginner/chapter2/solutions/float.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Float
2-
# Write a program that takes a number from the user
2+
# Write a program that takes a float from the user
33
# and stores it in a variable. Cast the number to an
44
# integer and store in another variable.
5-
# Then print: (floating point number) = (integer).
5+
# Then print: (floating point number) = (integer number).
6+
# For example, if the user enters 5, the output would be:
7+
# 5.0 = 5
68
# Also print the type of the floating point variable.
79
# Remember! type(variable_name) will return the data type of a variable
810

0 commit comments

Comments
 (0)