-
Notifications
You must be signed in to change notification settings - Fork 0
/
Task1.py
93 lines (53 loc) · 935 Bytes
/
Task1.py
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
66
67
# Homework --> Atabek
# 1)
# name = "Hello World!"
# print(len(name))
# 2)
# name = "Hello world!"
# print(name.lower(), name.upper())
# 3)
# name = "Hellow world!"
# print(name.replace('H', '$') .replace('!', '$'))
# 4) ????
# a = input("Write your words: ")
# b = (a.split( maxsplit = 4))
# print(b)
# 5)
# a = input("Write your name: ")
# b = "Hello, "
# c = "!"
# print(b + a + c)
# 6)
# a = "Hello word I am backend developer!"
# res = len(a.split())
# print(res)
# 7)
# 7.1
# a = "Hello world"
# b = (a[2])
# print(b)
# 7.2
# a = "Hello world"
# b = (a[-1])
# print(b)
# 7.3
# a = "Hello world"
# print(a[0:5])
# # 7.4
# a = "Hello world"
# print(a[0:10])
# 7.5
# a = "Hello world"
# print(a[:12:2])
# 7.6
# a = "Hello world!"
# print (a[1:12:2])
# 7.7
# a = "Hello world!"
# print(a[::-1])
# 7.8 ????
# a = "Hello world!"
# print(a[-1:2:-4])
# 7.9
# a = "Hello world!"
# print(len(a))