Added Homework 04 - Strings
This commit is contained in:
parent
aad4e226c5
commit
be356ccb59
24 changed files with 315 additions and 0 deletions
8
homework/homework04/input/input03.py
Normal file
8
homework/homework04/input/input03.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
print("This program converts the input to a float\n")
|
||||
data1 = input("Enter an float value for data1: ")
|
||||
|
||||
print(f"The type of data1 is {type(data1)} at input")
|
||||
data1 = float(data1)
|
||||
print(f"The type of data1 is {type(data1)} after conversion to float")
|
||||
print(f"The value of data1 is {data1}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue