Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kurs_alx_pcz
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
kurs_alx_pcz
Commits
c38f4a83
Commit
c38f4a83
authored
Nov 16, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kalkulator z break
parent
46d340fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
kalkulator4.py
dzien2/kalkulator4.py
+23
-0
No files found.
dzien2/kalkulator4.py
0 → 100644
View file @
c38f4a83
while
True
:
op
=
input
(
'Podaj znak operacji lub znak ! aby zakończyć: '
)
if
op
==
'!'
:
break
x
=
int
(
input
(
'Podaj pierwszą liczbę: '
))
y
=
int
(
input
(
'Podaj drugą liczbę: '
))
if
op
==
'+'
:
wynik
=
x
+
y
elif
op
==
'-'
:
wynik
=
x
-
y
elif
op
==
'*'
:
wynik
=
x
*
y
elif
op
==
'/'
:
if
y
==
0
:
wynik
=
'Nie wolno dzielić przez zero!'
else
:
wynik
=
x
/
y
else
:
wynik
=
'Nieznana operacja'
print
(
wynik
)
print
(
'Dziękujemy za skorzystanie z usług kalkulatora.'
)
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