Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
demot_extra
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Arttu Salonen
demot_extra
Commits
40f1e4da
Commit
40f1e4da
authored
5 months ago
by
Erkki Kaila
Browse files
Options
Downloads
Patches
Plain Diff
initial commit
parents
No related branches found
No related tags found
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
arvauspeli.py
+18
-0
18 additions, 0 deletions
arvauspeli.py
with
18 additions
and
0 deletions
arvauspeli.py
0 → 100644
+
18
−
0
View file @
40f1e4da
oikea
=
input
(
"
Anna oikea luku:
"
)
arvaukset
=
1
while
True
:
arvaus
=
int
(
input
(
"
Anna arvaus:
"
))
if
arvaus
<
oikea
:
print
(
"
Arvaus oli liian suuri!
"
)
elif
arvaus
>
oikea
:
print
(
"
Arvaus oli liian pieni
"
)
elif
arvaus
<
oikea
:
arvaukset
+=
1
print
(
"
Voitit pelin!
"
)
print
(
"
Arvasit oikein {arvaukset} kerralla!
"
)
\ No newline at end of file
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