Skip to content
Snippets Groups Projects
Commit 607aa63d authored by cprutean's avatar cprutean
Browse files

Upload New File

parent fe402ae9
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id:79199df9 tags:
# Reading Int and Float Main
%% Cell type:code id:58226ac9 tags:
``` python
"""
Starter Python program to read a float and an int, do some simple
processing and print output.
"""
def main():
""" Read in a float and and int
"""
x = float(input("Type in a floating point number between 5 and 10 : "))
ix = int(input("Type in an integer between 10 and 20 : "))
y = x/ix
print("Float: " + str(x) + " divided by " + str(ix) + " is " + str(y))
iy = ix//5
z = float(ix)/5
print("The integer : " + str(ix) + " divided by integer 5 is: " + str(iy))
print("and divided by and float 5.0 is : " + str(z))
main()
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment