Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ansire
/
IAX0583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3caf1030
authored
Sep 24, 2017
by
ansire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
panga ylessanne
parent
3f078ca9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
Praktikum3/pank.py
Praktikum3/pank.py
0 → 100644
View file @
3caf1030
while
True
:
summa
=
int
(
input
(
'Sisestage summa, mida soovite v2lja v6tta: '
))
if
summa
>
0
and
summa
%
5
==
0
:
break
else
:
print
(
"Summat
%
i ei ole v6imalik v2lja v6tta, sisestage 5ga jaguv summa"
%
(
summa
))
continue
kupyyrid
=
[
500
,
200
,
100
,
50
,
20
,
10
,
5
]
kogused
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
]
#print(summa)
while
True
:
if
summa
<=
0
:
break
for
i
in
range
(
len
(
kupyyrid
)):
if
summa
-
kupyyrid
[
i
]
>=
0
:
summa
-=
kupyyrid
[
i
]
kogused
[
i
]
+=
1
elif
summa
<=
0
:
break
test
=
0
for
i
in
range
(
len
(
kupyyrid
)):
test
+=
kupyyrid
[
i
]
*
kogused
[
i
]
print
(
'V2ljastatav summa {:d}€'
.
format
(
test
))
print
(
'V2ljastatavad kupyyrid:'
)
for
i
in
range
(
len
(
kupyyrid
)):
if
kogused
[
i
]
==
0
:
continue
print
(
'{:6d}€ - {:d}tk'
.
format
(
kupyyrid
[
i
],
kogused
[
i
]))
Write
Preview
Markdown
is supported
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