Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Data Science Notebooks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christof Kaufmann
Data Science Notebooks
Commits
9f7d724a
Commit
9f7d724a
authored
1 year ago
by
Christof Kaufmann
Browse files
Options
Downloads
Patches
Plain Diff
Notebooks from applied-cs/data-science@0d9becc1
parent
23f96819
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
01-python-grundlagen/01-typ-sol.ipynb
+79
-0
79 additions, 0 deletions
01-python-grundlagen/01-typ-sol.ipynb
01-python-grundlagen/01-typ.ipynb
+33
-0
33 additions, 0 deletions
01-python-grundlagen/01-typ.ipynb
with
112 additions
and
0 deletions
01-python-grundlagen/01-typ-sol.ipynb
0 → 100644
+
79
−
0
View file @
9f7d724a
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Datentyp ausgeben\n",
"\n",
"Welchen Datentyp haben folgende Werte?\n",
"\n",
"1. `True`\n",
"2. `0j`\n",
"3. `None`\n",
"\n",
"## Lösung\n",
"\n",
"Die Typen lassen sich einfach mit `type` bestimmen:"
],
"id": "0004-1f61845aa97bff37f25f818467391b497fa5b6fcf087d0e81c71532c275"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"<class 'bool'>"
]
}
],
"source": [
"type(True)"
],
"id": "0005-df7d7494b32b7cdbd79087a8dd57a4c6c95095e82547c637f4c4bfe485f"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"<class 'complex'>"
]
}
],
"source": [
"type(0j)"
],
"id": "0006-13b52566f22a279acd63fc57d95091b2493357706bd065d8a727b572611"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"<class 'NoneType'>"
]
}
],
"source": [
"type(None)"
],
"id": "0007-d581c12814308cfeab9686cf0b8a070a86377c5a2d8a168461e9fb10135"
}
],
"nbformat": 4,
"nbformat_minor": 5,
"metadata": {}
}
%% Cell type:markdown id:0004-1f61845aa97bff37f25f818467391b497fa5b6fcf087d0e81c71532c275 tags:
# Datentyp ausgeben
Welchen Datentyp haben folgende Werte?
1.
`True`
2.
`0j`
3.
`None`
## Lösung
Die Typen lassen sich einfach mit
`type`
bestimmen:
%% Cell type:code id:0005-df7d7494b32b7cdbd79087a8dd57a4c6c95095e82547c637f4c4bfe485f tags:
```
type(True)
```
%% Output
<class 'bool'>
%% Cell type:code id:0006-13b52566f22a279acd63fc57d95091b2493357706bd065d8a727b572611 tags:
```
type(0j)
```
%% Output
<class 'complex'>
%% Cell type:code id:0007-d581c12814308cfeab9686cf0b8a070a86377c5a2d8a168461e9fb10135 tags:
```
type(None)
```
%% Output
<class 'NoneType'>
This diff is collapsed.
Click to expand it.
01-python-grundlagen/01-typ.ipynb
0 → 100644
+
33
−
0
View file @
9f7d724a
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Datentyp ausgeben\n",
"\n",
"Welchen Datentyp haben folgende Werte?\n",
"\n",
"1. `True`\n",
"2. `0j`\n",
"3. `None`\n",
"\n",
"Hier Ihr Code:"
],
"id": "0003-2a798ee28cfcb938800beac0fd4712c3d054f0b3f638832be626b907c00"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"style": "python"
},
"outputs": [],
"source": [],
"id": "0004-44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
],
"nbformat": 4,
"nbformat_minor": 5,
"metadata": {}
}
%% Cell type:markdown id:0003-2a798ee28cfcb938800beac0fd4712c3d054f0b3f638832be626b907c00 tags:
# Datentyp ausgeben
Welchen Datentyp haben folgende Werte?
1.
`True`
2.
`0j`
3.
`None`
Hier Ihr Code:
%% Cell type:code id:0004-44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 tags:
```
```
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