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
ab422039
Commit
ab422039
authored
Nov 16, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zadanie bagaż - split w wersji 5
parent
29a58c5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
bagaz5.py
dzien2/bagaz5.py
+9
-3
No files found.
dzien2/bagaz5.py
View file @
ab422039
a
=
float
(
input
(
'Podaj długość: '
))
# użytkownik podaje 3 liczby w jednej linii rozdzielają je spacjami
b
=
float
(
input
(
'Podaj szerokość: '
))
linia
=
input
(
'Podaj 3 liczby, wymiary bagażu:
\n
'
)
c
=
float
(
input
(
'Podaj wysokość: '
))
# przy takim zapisie w zmiennych a b c mielibyśmy stringi
# a, b, c = linia.split()
# teraz dla każdego elementu stosuję zamianę na float:
a
,
b
,
c
=
(
float
(
x
)
for
x
in
linia
.
split
())
v
=
a
*
b
*
c
v
=
a
*
b
*
c
if
a
>
50
or
b
>
50
or
c
>
50
:
if
a
>
50
or
b
>
50
or
c
>
50
:
...
...
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