added many files

This commit is contained in:
ada-dmitry
2024-02-29 15:12:40 +03:00
parent 5a686b0f92
commit 09c84971a9
11 changed files with 101 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
import json
with open('hub\data.json') as f:
data = json.load(f)
print(data["events_data"][0]['id'])
+1
View File
File diff suppressed because one or more lines are too long
+16 -1
View File
@@ -1 +1,16 @@
print("Hello, World!")
class restaurant():
def __init__(self, restaurant_name, cuisine_type):
self.restaurant_name = restaurant_name
self.cuisine_type = cuisine_type
def describe_restaurant(self):
print(f'{self.restaurant_name.title()}, {self.cuisine_type.title()}')
def open_rest(self):
print(f'Ресторан {self.restaurant_name.title()} открыт!')
rest = restaurant('Mish', 'rus')
rest.describe_restaurant()
rest.open_rest()