Skip to content
Snippets Groups Projects
Commit 53ce12d1 authored by Philip J Clark's avatar Philip J Clark
Browse files

removing ipynb output

parent bfddd996
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id:c4837837 tags: %% Cell type:markdown id:c4837837 tags:
# Reading Int and Float # Reading Int and Float
%% Cell type:code id:74cbe97e tags: %% Cell type:code id:74cbe97e tags:
``` python ``` python
""" """
Starter Python program to read a float and an int, do some simple Starter Python program to read a float and an int, do some simple
processing and print output. processing and print output.
""" """
# Read in a float and and int # Read in a float and and int
x = float(input("Type in a floating point number between 5 and 10 : ")) x = float(input("Type in a floating point number between 5 and 10 : "))
ix = int(input("Type in an integer between 10 and 20 : ")) ix = int(input("Type in an integer between 10 and 20 : "))
y = x/ix y = x/ix
print("Float: " + str(x) + " divided by " + str(ix) + " is " + str(y)) print("Float: " + str(x) + " divided by " + str(ix) + " is " + str(y))
iy = ix//5 iy = ix//5
z = float(ix)/5 z = float(ix)/5
print("The integer : " + str(ix) + " divided by integer 5 is: " + str(iy)) print("The integer : " + str(ix) + " divided by integer 5 is: " + str(iy))
print("and divided by and float 5.0 is : " + str(z)) print("and divided by and float 5.0 is : " + str(z))
``` ```
%% Output
Type in a floating point number between 5 and 10 : 6
Type in an integer between 10 and 20 : 17
Float: 6.0 divided by 17 is 0.35294117647058826
The integer : 17 divided by integer 5 is: 3
and divided by and float 5.0 is : 3.4
%% Cell type:code id:21fbf95f tags: %% Cell type:code id:21fbf95f tags:
``` python ``` python
``` ```
......
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