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
8ba5f6e9
Commit
8ba5f6e9
authored
Nov 30, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
klasa Product
parent
4c0e7f67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
product1.py
dzien7/klasy_wprowadzenie/product1.py
+5
-1
No files found.
dzien7/klasy_wprowadzenie/product1.py
View file @
8ba5f6e9
...
...
@@ -7,7 +7,11 @@ class Product:
def
print_info
(
self
):
print
(
f
'Produkt "{self.nazwa}", id: {self.id}, cena: {self.cena} PLN'
)
def
__str__
(
self
):
return
f
'Produkt nr {self.id}: {self.nazwa} za {self.cena}'
p
=
Product
(
1
,
'Woda'
,
10.99
)
p
.
print_info
()
print
(
'p:'
,
p
)
print
(
p
)
print
(
f
'Mam w zmiennej coś: {p}. Koniec tematu.'
)
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