Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ITGK2020
borgeha forelesningskode
Commits
86bccbd4
Commit
86bccbd4
authored
Sep 29, 2020
by
Børge Haugset
Browse files
glemte noen detaljer
parent
bf3712ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
uke39/flere_funksjoner.py
View file @
86bccbd4
...
...
@@ -5,7 +5,7 @@
def
finn_streng_og_plass
():
while
True
:
streng
=
input
(
'Streng: '
)
streng
=
input
(
'S
kriv inn en s
treng: '
)
plass
=
int
(
input
(
f
'Tall mellom 0 og
{
len
(
streng
)
-
1
}
: '
))
if
plass
>
len
(
streng
)
-
1
:
continue
...
...
@@ -21,4 +21,4 @@ def main():
tekst
,
tall
=
finn_streng_og_plass
()
skriv_bokstav
(
tekst
,
tall
)
main
()
\ No newline at end of file
main
()
uke39/random_stuff.py
View file @
86bccbd4
...
...
@@ -13,5 +13,5 @@ print(random.randrange(100,200,10)) # Akkurat som range
# Tilfeldig blant en mengde:
print
(
random
.
choice
(
'abcdefgh'
))
print
(
random
.
choice
([
1
,
2
,
'tre'
]))
\ No newline at end of file
print
(
random
.
choice
(
'abcdefghi'
))
print
(
random
.
choice
([
1
,
2
,
'tre'
]))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment