Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SciProg2024
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pclark3
SciProg2024
Commits
53ce12d1
Commit
53ce12d1
authored
1 year ago
by
Philip J Clark
Browse files
Options
Downloads
Patches
Plain Diff
removing ipynb output
parent
bfddd996
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CodeExamples/ReadingIntandFloat.ipynb
+2
-14
2 additions, 14 deletions
CodeExamples/ReadingIntandFloat.ipynb
with
2 additions
and
14 deletions
CodeExamples/ReadingIntandFloat.ipynb
+
2
−
14
View file @
53ce12d1
...
@@ -10,22 +10,10 @@
...
@@ -10,22 +10,10 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
1
,
"execution_count":
null
,
"id": "74cbe97e",
"id": "74cbe97e",
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"Type in a floating point number between 5 and 10 : 6\n",
"Type in an integer between 10 and 20 : 17\n",
"Float: 6.0 divided by 17 is 0.35294117647058826\n",
"The integer : 17 divided by integer 5 is: 3\n",
"and divided by and float 5.0 is : 3.4\n"
]
}
],
"source": [
"source": [
"\"\"\"\n",
"\"\"\"\n",
" Starter Python program to read a float and an int, do some simple\n",
" Starter Python program to read a float and an int, do some simple\n",
...
...
%% 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
```
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment