-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.py
More file actions
65 lines (52 loc) · 1.94 KB
/
function.py
File metadata and controls
65 lines (52 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
def greet_user():
"""Выводит простое приветствие."""
print("Hello!")
greet_user()
def greet_user(username):
"""Выводит простое приветствие."""
print("Hello " + username.title() + ".")
greet_user('Anna')
def display_message(function):
print("\nThis chapter is very good :)" + function.title())
display_message('It is really cool!')
def favorite_book(little):
print("\n" + little)
favorite_book('One of my favorite books is Alice ' +
'in Wonderland')
def describe_pet(animal_type, petname):
print("\nI have a " + animal_type)
print("\nMy " + animal_type + "'s name is " + petname.title() + ".")
describe_pet('elefant', 'jumbo')
describe_pet('dog', 'willie')
#describe_pet(animal_type='hamster', pet_name='harry')
#describe_pet(pet_name='harry', animal_type='hamster')
def make_shirt(size, text):
print("\nThe size your tshirt is: " + size)
print("\n The print on yor tshirt is :" + text)
make_shirt('XL', 'The world is mine!')
def make_shirt(size = 'XL', text = 'The world is mine!'):
print("\nThe size your tshirt is: " + size)
print("\nThe print on yor tshirt is :" + text)
make_shirt()
def make_shirt(size, text = 'The world is mine!'):
print("\nThe size your tshirt is: " + size)
print("\nThe print on yor tshirt is :" + text)
make_shirt('XL')
def make_shirt(size = 'L', text = 'I love python!'):
print("\nSize is : " + size)
print("\nText is: " + text)
make_shirt()
def make_shirt(text, size = 'L'):
print("\nSize is : " + size)
print("\nText is: " + text)
make_shirt('I love Python!')
def make_shirt(text, size = 'L'):
print("\nSize is : " + size)
print("\nText is: " + text)
make_shirt(text='I love Python!')
def descrybe_city(city, country = 'Russia'):
print("\nI love " + country + " and my city " + city)
descrybe_city('Moskow')
descrybe_city('Saint-Petersburg')
descrybe_city('Ekaterinburg')
descrybe_city(city = 'Ufa')