In hộp trong python

Chúng ta có thể sử dụng tiện ích văn bản Tkinter để chèn văn bản, hiển thị thông tin và lấy đầu ra từ tiện ích văn bản. Để nhận thông tin nhập của người dùng trong tiện ích văn bản, chúng ta phải sử dụng phương thức get[]. Hãy lấy một ví dụ để xem nó hoạt động như thế nào

Thí dụ

# Import the required library
from tkinter import *
from tkinter import ttk

# Create an instance of tkinter frame
win=Tk[]

# Set the geometry
win.geometry["700x350"]

def get_input[]:
   label.config[text=""+text.get[1.0, "end-1c"]]

# Add a text widget
text=Text[win, width=80, height=15]
text.insert[END, ""]
text.pack[]

# Create a button to get the text input
b=ttk.Button[win, text="Print", command=get_input]
b.pack[]

# Create a Label widget
label=Label[win, text="", font=['Calibri 15']]
label.pack[]

win.mainloop[]

đầu ra

Chạy đoạn mã trên sẽ hiển thị cửa sổ chứa tiện ích văn bản. Nhập nội dung nào đó vào tiện ích văn bản và nhấp vào nút "In" để hiển thị đầu ra

3 dòng đầu tiên là hoàn toàn bắt buộc và sau đó sửa đổi sẽ dẫn đến hành vi lạ. Những gì bạn nên sửa đổi là nội dung của phương thức khởi tạo. Bạn có thể khởi tạo các thuộc tính [chẳng hạn như biến hoặc proxy cho các mô-đun khác]. Bạn nên làm mọi thứ mà bạn chỉ muốn làm một lần, vì hộp này sẽ không bị hủy trước khi kết thúc hành vi này

  • Bạn sẽ thấy một phương thức “onLoad”. Điều này được gọi bất cứ khi nào hộp được tải, có thể do một trong ba sự kiện sau gây ra

    Hành vi được bắt đầu và hộp ở cấp cơ sở. Hộp được chứa trong khung hình chính hành vi đang được tải. Hộp này được chứa trong một hộp khác [có nghĩa là hộp thứ hai có "sơ đồ luồng" con] và chúng tôi đã kích hoạt đầu vào có tính chất "onStart" trên hộp chính

    Ghi chú

    Phương thức này được gọi khi hộp được tải, vì vậy bạn nên tránh mã nặng ở đây. Có nghĩa là nếu quá trình tải hộp mất quá nhiều thời gian, toàn bộ hành vi sẽ bị chậm lại. Nếu bạn đang ở trong Dòng thời gian, bạn thậm chí có thể mất thời gian thực

  • Bạn cũng có thể thấy phương thức “onUnload”. Điều này được gọi bất cứ khi nào hộp được dỡ xuống, có thể do một trong hai sự kiện gây ra

    Hành vi bị dừng lại. Hộp được chứa trong một khung hình chính hành vi và một khung hình chính khác của cùng một lớp đang được tải [vì khung hình chính cha của hộp hiện tại cần được dỡ tải]. Hộp này được chứa trong một hộp khác [có nghĩa là hộp thứ hai có "sơ đồ luồng" con] và chúng tôi đã kích hoạt đầu vào có tính chất "onStop" trên hộp chính

    Ghi chú

    Điều này cho phép bạn cảnh báo các mô-đun khác rằng hộp của bạn sắp được dỡ xuống và do đó có thể rất hữu ích. Bây giờ bạn có thể quên nó đi, bạn sẽ không cần sử dụng chức năng này cho các hộp đơn giản

  • Và những gì về phương pháp đầu vào? . Bạn đang chạy trong các chủ đề riêng biệt, vì vậy hãy dành thời gian của bạn, tính toán nặng nề, nó sẽ không ảnh hưởng đến hành vi chơi. Hãy nhớ rằng [các] đầu ra của bạn sẽ không được kích thích trừ khi bạn làm như vậy một cách rõ ràng. Có nghĩa là bạn viết “onStopped” ở đâu đó trong mã của mình. Vì vậy, nếu bạn sử dụng một số hộp tập lệnh mà bạn đã viết và bạn không hiểu tại sao tín hiệu không bao giờ xuất hiện ở một trong các hộp của mình, thì nguyên nhân sẽ không khó để tìm ra. bạn quên gọi đầu ra sau khi xử lý xong. Vâng, điều đó thật đau đớn, nhưng theo cách này, bạn thực sự có thể quyết định khi nào bạn muốn nó được kích thích, điều này cho phép bạn làm những việc mạnh mẽ [và cũng có thể sử dụng một số đầu ra tùy thích]

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    5

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    0

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ________ 83 ________ 84 ________ 85

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    7

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    9____180
    for [j = 1; j < = columns; j++]
    81

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    83

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    9____186
    for [j = 1; j < = columns; j++]
    87

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    91

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    95

    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    97

    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    91

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    93

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    95
    for [j = 1; j < = columns; j++]
    96

    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    98

    for [j = 1; j < = columns; j++]
    99

    C




    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    670

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    671

     

    for [i = 1; i < = rows; i++]
    2

    for [i = 1; i < = rows; i++]
    3
    for [i = 1; i < = rows; i++]
    4_______55
    for [i = 1; i < = rows; i++]
    6
    for [i = 1; i < = rows; i++]
    5
    for [i = 1; i < = rows; i++]
    8

    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    2

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    5

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    0

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ________ 83 ________ 84 ________ 8695

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    697____8698
    for [j = 1; j < = columns; j++]
    80
    for [i = 1; i < = rows; i++]
    00

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    83

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    697____8698
    for [j = 1; j < = columns; j++]
    86
    for [i = 1; i < = rows; i++]
    00

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    8
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    697____8698
    for [i = 1; i < = rows; i++]
    13
    for [i = 1; i < = rows; i++]
    14

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    89

     

    for [i = 1; i < = rows; i++]
    18

    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    97

    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    91

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    93

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    95
    for [j = 1; j < = columns; j++]
    96

    for [j = 1; j < = columns; j++]
    89

    Java




    for [i = 1; i < = rows; i++]
    31

    for [i = 1; i < = rows; i++]
    32
    for [i = 1; i < = rows; i++]
    33

     

    for [i = 1; i < = rows; i++]
    34
    for [i = 1; i < = rows; i++]
    35

    for [j = 1; j < = columns; j++]
    0

    for [j = 1; j < = columns; j++]
    0____52

    for [j = 1; j < = columns; j++]
    0_______540
    for [i = 1; i < = rows; i++]
    3
    for [i = 1; i < = rows; i++]
    4
    for [i = 1; i < = rows; i++]
    5
    for [i = 1; i < = rows; i++]
    6
    for [i = 1; i < = rows; i++]
    5
    for [i = 1; i < = rows; i++]
    8

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    2

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    for [i = 1; i < = rows; i++]
    54____555
    for [i = 1; i < = rows; i++]
    56

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    4
    for [i = 1; i < = rows; i++]
    61____555
    for [i = 1; i < = rows; i++]
    63

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    4
    for [i = 1; i < = rows; i++]
    68
    for [i = 1; i < = rows; i++]
    55
    for [i = 1; i < = rows; i++]
    70

    for [i = 1; i < = rows; i++]
    71
    for [i = 1; i < = rows; i++]
    72
    for [i = 1; i < = rows; i++]
    55
    for [i = 1; i < = rows; i++]
    74

    for [i = 1; i < = rows; i++]
    71____576
    for [j = 1; j < = columns; j++]
    80
    for [i = 1; i < = rows; i++]
    00

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    83

    _______571____576____186

    for [i = 1; i < = rows; i++]
    00

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    89

    _______83____588

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    89

    for [i = 1; i < = rows; i++]
    91

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

    for [i = 1; i < = rows; i++]
    91

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    18

    ________ 10 ________ 598 ________ 540 ________ 53 ________ 101

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    06
    for [j = 1; j < = columns; j++]
    07
    for [j = 1; j < = columns; j++]
    08
    for [j = 1; j < = columns; j++]
    09
    for [j = 1; j < = columns; j++]
    87

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    93

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    16

    Python3




    for [j = 1; j < = columns; j++]
    17

     

    for [j = 1; j < = columns; j++]
    18

    for [j = 1; j < = columns; j++]
    19
    for [j = 1; j < = columns; j++]
    20

    for [j = 1; j < = columns; j++]
    0

    for [j = 1; j < = columns; j++]
    0_______14
    for [j = 1; j < = columns; j++]
    24
    for [j = 1; j < = columns; j++]
    25
    for [j = 1; j < = columns; j++]
    26
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    29
    for [j = 1; j < = columns; j++]
    30
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    32

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    35
    for [j = 1; j < = columns; j++]
    25
    for [j = 1; j < = columns; j++]
    26
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    40
    for [j = 1; j < = columns; j++]
    30
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    32

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    4
    for [j = 1; j < = columns; j++]
    46
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    47
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    50
    for [j = 1; j < = columns; j++]
    24
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    54
    for [j = 1; j < = columns; j++]
    50

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    35
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    47
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    50
    for [j = 1; j < = columns; j++]
    35
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    65

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    67
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [j = 1; j < = columns; j++]
    80
    for [j = 1; j < = columns; j++]
    70
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    72

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    83
    for [j = 1; j < = columns; j++]
    75

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    67
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [j = 1; j < = columns; j++]
    86
    for [j = 1; j < = columns; j++]
    70
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    72

    for [j = 1; j < = columns; j++]
    8

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    67
    for [j = 1; j < = columns; j++]
    86

     

     

    for [j = 1; j < = columns; j++]
    87

    for [j = 1; j < = columns; j++]
    88
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    07

    ________ 191 ________ 147 ________ 109

    for [j = 1; j < = columns; j++]
    94

     

     

    for [j = 1; j < = columns; j++]
    95

    C#




    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    69
    for [j = 1; j < = columns; j++]
    97

    for [i = 1; i < = rows; i++]
    98
    for [i = 1; i < = rows; i++]
    34
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    00

    for [i = 1; i < = rows; i++]
    9

     

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    02
    for [i = 1; i < = rows; i++]
    2

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    02
    for [i = 1; i < = rows; i++]
    40
    for [i = 1; i < = rows; i++]
    3
    for [i = 1; i < = rows; i++]
    4
    for [i = 1; i < = rows; i++]
    5
    for [i = 1; i < = rows; i++]
    6
    for [i = 1; i < = rows; i++]
    5
    for [i = 1; i < = rows; i++]
    8

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    02
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    2

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    5

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [j = 1; j < = columns; j++]
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    0

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    5

    _______83____831

    _______832____833____180

    for [i = 1; i < = rows; i++]
    00

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    83

    _______832____833____186

    for [i = 1; i < = rows; i++]
    00

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [j = 1; j < = columns; j++]
    89

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    45

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

     

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    02
    for [j = 1; j < = columns; j++]
    89

     

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    02
    for [i = 1; i < = rows; i++]
    18

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    02
    for [i = 1; i < = rows; i++]
    98
    for [i = 1; i < = rows; i++]
    40
    for [i = 1; i < = rows; i++]
    3
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    56

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    02
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    91

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    93

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    02
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    89

     

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    67

    PHP




    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    68

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    69

     

    for [i = 1; i < = rows; i++]
    2

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    71
    for [i = 1; i < = rows; i++]
    4____873
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    74
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    75
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    76

    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    for [j = 1; j < = columns; j++]
    87

    for [j = 1; j < = columns; j++]
    0
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    for [j = 1; j < = columns; j++]
    87

    for [j = 1; j < = columns; j++]
    0_______14
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    88
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    90
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    73
    for [j = 1; j < = columns; j++]
    87
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    94

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    88
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    90
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    75
    for [j = 1; j < = columns; j++]
    87
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    94

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    for [j = 1; j < = columns; j++]
    814
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    for [j = 1; j < = columns; j++]
    816
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    73
    for [j = 1; j < = columns; j++]
    818

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    for [j = 1; j < = columns; j++]
    814
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    for [j = 1; j < = columns; j++]
    816
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    75
    for [j = 1; j < = columns; j++]
    825

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    827____8698
    for [j = 1; j < = columns; j++]
    80
    for [j = 1; j < = columns; j++]
    830

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    83

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    827
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [j = 1; j < = columns; j++]
    86
    for [j = 1; j < = columns; j++]
    830

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    827
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [i = 1; i < = rows; i++]
    13
    for [i = 1; i < = rows; i++]
    14

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    95

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    851
    for [j = 1; j < = columns; j++]
    852

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    854
    for [j = 1; j < = columns; j++]
    855

    for [j = 1; j < = columns; j++]
    0____54____1851____874
    for [j = 1; j < = columns; j++]
    854
    for [i = 1; i < = rows; i++]
    14

     

    for [j = 1; j < = columns; j++]
    862

    for [j = 1; j < = columns; j++]
    863

    Javascript




    for [j = 1; j < = columns; j++]
    864

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [j = 1; j < = columns; j++]
    866

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [i = 1; i < = rows; i++]
    2

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    71
    for [j = 1; j < = columns; j++]
    871

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    875
    for [j = 1; j < = columns; j++]
    2

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    5

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    32
    for [j = 1; j < = columns; j++]
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    0

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    32
    for [i = 1; i < = rows; i++]
    9

    ________ 83 ________ 84 ________ 1889

    for [j = 1; j < = columns; j++]
    890
    for [j = 1; j < = columns; j++]
    891
    for [j = 1; j < = columns; j++]
    80
    for [i = 1; i < = rows; i++]
    14

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    83

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    891
    for [j = 1; j < = columns; j++]
    898
    for [i = 1; i < = rows; i++]
    14

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    32
    for [j = 1; j < = columns; j++]
    89

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    32
    for [j = 1; j < = columns; j++]
    891____2904
    for [i = 1; i < = rows; i++]
    14

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    89

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [j = 1; j < = columns; j++]
    89

     

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [j = 1; j < = columns; j++]
    95

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [j = 1; j < = columns; j++]
    875
    for [j = 1; j < = columns; j++]
    914

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    916

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22
    for [j = 1; j < = columns; j++]
    93

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    22

    _______822____2921

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    923

    Đầu ra.
     

    ________số 8

    Độ phức tạp về thời gian. O[m * n], trong đó m và n đại diện cho các đầu vào đã cho.
    Không gian phụ. O[1], không cần thêm khoảng trống, vì vậy nó là hằng số.

    Mô hình ngôi sao vuông rỗng

     

    for [j = 1; j < = columns; j++]
    8

    Giải thích.
     

    • Nhập số hàng
    • Đối với các hàng, một vòng lặp bên ngoài từ 1 đến N
    • Đối với các cột, một vòng lặp bên trong từ 1 đến N
    • Dấu sao in bên trong vòng lặp bên trong cho hàng đầu tiên và cuối cùng hoặc cho cột đầu tiên và cuối cùng. Đó là dấu sao in 
       
    for [j = 1; j < = columns; j++]
    9
    • mặt khác in không gian
    • Sau khi in tất cả các cột của một hàng, hãy in một dòng trống sau vòng lặp bên trong.
       

     

    Khuyến khích. Vui lòng thử cách tiếp cận của bạn trên {IDE} trước, trước khi chuyển sang giải pháp

     

    C++




    for [j = 1; j < = columns; j++]
    924

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    87

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    69
    for [i = 1; i < = rows; i++]
    0
    for [i = 1; i < = rows; i++]
    1

     

    for [j = 1; j < = columns; j++]
    929

    for [i = 1; i < = rows; i++]
    3
    for [j = 1; j < = columns; j++]
    931____55
    for [j = 1; j < = columns; j++]
    933

    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    2

    for [j = 1; j < = columns; j++]
    0

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    5

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    946

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ________ 83 ________ 84 ________ 2951

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    9____180
    for [j = 1; j < = columns; j++]
    955

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    83

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    9____186
    for [j = 1; j < = columns; j++]
    955

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    8
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    9____513____187

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    971

    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    97

    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    977

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    979

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    95
    for [j = 1; j < = columns; j++]
    96

    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    984

    C




    for [j = 1; j < = columns; j++]
    985

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    671

     

    for [j = 1; j < = columns; j++]
    929

    for [i = 1; i < = rows; i++]
    3
    for [j = 1; j < = columns; j++]
    931____55
    for [j = 1; j < = columns; j++]
    933

    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    2

    for [j = 1; j < = columns; j++]
    0

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    5

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    946

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ________ 83 ________ 84 ________ 3909

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    697____8698
    for [j = 1; j < = columns; j++]
    80
    for [i = 1; i < = rows; i++]
    00

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    83

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    697____8698
    for [j = 1; j < = columns; j++]
    86
    for [i = 1; i < = rows; i++]
    00

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    8
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    697____8698
    for [i = 1; i < = rows; i++]
    13
    for [i = 1; i < = rows; i++]
    14

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    971

    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    97

    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    977

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    979

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    95
    for [j = 1; j < = columns; j++]
    96

    for [j = 1; j < = columns; j++]
    89

    Java




    for [j = 1; j < = columns; j++]
    945

    for [i = 1; i < = rows; i++]
    32
    for [i = 1; i < = rows; i++]
    33

     

    for [i = 1; i < = rows; i++]
    34
    for [i = 1; i < = rows; i++]
    35

    for [j = 1; j < = columns; j++]
    0

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    929

    for [j = 1; j < = columns; j++]
    0_______540
    for [i = 1; i < = rows; i++]
    3
    for [j = 1; j < = columns; j++]
    931
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    933

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    2

    for [j = 1; j < = columns; j++]
    964

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    for [i = 1; i < = rows; i++]
    54____555
    for [i = 1; i < = rows; i++]
    56

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    4
    for [i = 1; i < = rows; i++]
    61____555
    for [j = 1; j < = columns; j++]
    976

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    4
    for [i = 1; i < = rows; i++]
    68
    for [i = 1; i < = rows; i++]
    55
    for [i = 1; i < = rows; i++]
    70

    for [i = 1; i < = rows; i++]
    71
    for [i = 1; i < = rows; i++]
    72
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    987

    for [i = 1; i < = rows; i++]
    71____576
    for [j = 1; j < = columns; j++]
    80
    for [i = 1; i < = rows; i++]
    00

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    83

    _______571____576____186

    for [i = 1; i < = rows; i++]
    00

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    89

    _______83____588

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    89

    for [i = 1; i < = rows; i++]
    91

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

    for [i = 1; i < = rows; i++]
    91

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    971

    ________ 10 ________ 598 ________ 540 ________ 53 ________ 101

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    06
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6720
    for [j = 1; j < = columns; j++]
    87

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    979

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    89

     

    for [j = 1; j < = columns; j++]
    16

    Python3




    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6728

     

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6729

    for [j = 1; j < = columns; j++]
    19
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6731

    for [j = 1; j < = columns; j++]
    0

    for [j = 1; j < = columns; j++]
    0_______14
    for [j = 1; j < = columns; j++]
    24
    for [j = 1; j < = columns; j++]
    25
    for [j = 1; j < = columns; j++]
    26
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    29
    for [j = 1; j < = columns; j++]
    30
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    32

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    35
    for [j = 1; j < = columns; j++]
    25
    for [j = 1; j < = columns; j++]
    26
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    29
    for [j = 1; j < = columns; j++]
    30
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    32

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    4
    for [j = 1; j < = columns; j++]
    46
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    47
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    50
    for [j = 1; j < = columns; j++]
    24
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    54
    for [j = 1; j < = columns; j++]
    50

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    35
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    47
    for [i = 1; i < = rows; i++]
    55
    for [j = 1; j < = columns; j++]
    50
    for [j = 1; j < = columns; j++]
    35
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    47
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6776

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    67
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [j = 1; j < = columns; j++]
    80
    for [j = 1; j < = columns; j++]
    70
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    72

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    83
    for [j = 1; j < = columns; j++]
    75

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    67
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    for [j = 1; j < = columns; j++]
    86
    for [j = 1; j < = columns; j++]
    70
    for [j = 1; j < = columns; j++]
    47
    for [j = 1; j < = columns; j++]
    72

    for [j = 1; j < = columns; j++]
    8

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    67
    for [j = 1; j < = columns; j++]
    86

    for [j = 1; j < = columns; j++]
    8

    for [j = 1; j < = columns; j++]
    8

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8700

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8701

    for [j = 1; j < = columns; j++]
    88
    for [j = 1; j < = columns; j++]
    47
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6720

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8705

     

    for [j = 1; j < = columns; j++]
    95

    C#




    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8707

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8708

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    69
    for [j = 1; j < = columns; j++]
    97

     

    for [i = 1; i < = rows; i++]
    34
    for [i = 1; i < = rows; i++]
    35

    for [j = 1; j < = columns; j++]
    0

    for [j = 1; j < = columns; j++]
    0
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8715

    for [j = 1; j < = columns; j++]
    0____88717

    for [j = 1; j < = columns; j++]
    0_______540
    for [i = 1; i < = rows; i++]
    3
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8721
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    933

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    2

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    5

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    4
    for [j = 1; j < = columns; j++]
    946

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    5

    _______571____88743

    _______571____88745

    for [i = 1; i < = rows; i++]
    71
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    33
    for [j = 1; j < = columns; j++]
    80
    for [j = 1; j < = columns; j++]
    830

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    for [j = 1; j < = columns; j++]
    83

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    33____186
    for [j = 1; j < = columns; j++]
    830

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    for [j = 1; j < = columns; j++]
    89

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    45

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    0

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    0

    for [j = 1; j < = columns; j++]
    0
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8767

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    98
    for [i = 1; i < = rows; i++]
    40
    for [i = 1; i < = rows; i++]
    3
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    56

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    5
    for [j = 1; j < = columns; j++]
    977

    for [j = 1; j < = columns; j++]
    8
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8779

    for [j = 1; j < = columns; j++]
    0
    for [j = 1; j < = columns; j++]
    89

    for [j = 1; j < = columns; j++]
    89

     

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8783

    PHP




    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    68

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8785

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8708

     

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8715

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8717

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    71
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    8721____873
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    76

    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    0
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    for [j = 1; j < = columns; j++]
    87

    for [j = 1; j < = columns; j++]
    0
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    for [j = 1; j < = columns; j++]
    87

    for [j = 1; j < = columns; j++]
    0_______14
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    88
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    90
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    73
    for [j = 1; j < = columns; j++]
    87
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    94

    for [j = 1; j < = columns; j++]
    0
    for [i = 1; i < = rows; i++]
    9

    for [j = 1; j < = columns; j++]
    8
    for [j = 1; j < = columns; j++]
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    88
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    90
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    73
    for [j = 1; j < = columns; j++]
    87
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    94

    for [j = 1; j < = columns; j++]
    8
    for [i = 1; i < = rows; i++]
    9

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    3
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    4
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    698
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6930
    for [j = 1; j < = columns; j++]
    50
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    for [j = 1; j < = columns; j++]
    816
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    73
    for [j = 1; j < = columns; j++]
    50
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    for [j = 1; j < = columns; j++]
    814

    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6938
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    for [j = 1; j < = columns; j++]
    816
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    73
    for [j = 1; j < = columns; j++]
    50
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    79
    for [j = 1; j < = columns; j++]
    816
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    for [j = 1; j < = columns; j++]
    50
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    82
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6948
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    73
    ********************
    *                  *
    *                  *
    *                  *
    *                  *
    ********************
    6950

    Làm cách nào để tạo một hộp trong Python?

    Để làm như vậy. .
    Kéo và thả hộp Audio > Voice > Say vào sơ đồ
    Bấm đúp vào nó để hiển thị sơ đồ bên trong
    Sao chép hộp văn bản Nói
    Nhấp vào nhãn gốc để quay lại hành vi
    Dán hộp văn bản Nói
    Xóa ô Nói

    in [*A trong Python là gì?

    Hàm print[] in thông báo đã chỉ định ra màn hình hoặc thiết bị đầu ra tiêu chuẩn khác . Thông báo có thể là một chuỗi, hoặc bất kỳ đối tượng nào khác, đối tượng sẽ được chuyển thành chuỗi trước khi ghi ra màn hình.

  • Chủ Đề