Connect 4 board

558fe5180e0e8fc922d31c23ef84d240

I made a 3x3 connect 4 board game now I want to expand it so Its an actual connect 4 game and not tic tac toe. I want to make the board 5x7 please help

from random import randint
def initialiseBoard():
    print('Following is the board and the respective positions.\nEnter the row and column separated by a space to play.')
    board = [['' for x in range(3)] for y in range(3)]
    for i in range(3):
        for j in range(3):
            print('[{0},{1}] '.format(i + 1, j + 1), end='')
        print()
    return board
def inputBoard(board, turn, play):
    print()
    if play == 'player':
        if turn % 2 == 0:
            print('Player X What move do you want to make? Answer as row (vertical) column (horizontal) or save game or load game ')
        else:
            print("Player O What move do you want to make? Answer as row (vertical) column (horizontal) or save game or load game ")
        x, y = map(int, input().split(' '))
        if x > 3 or y > 3 or x < 1 or y < 1:
            print("Enter valid position")
            return True
    if play == 'ai':
        # print('Computer entered its position ')
        while True:
            x = randint(1, 3)
            y = randint(1, 3)
            if board[x - 1][y - 1] == '':
                break
    i = x - 1
    j = y - 1
    if board[i][j] != '':
        print("Enter row and column that hasnt already been chosen.")
        return True
    if turn % 2 == 0:
        board[i][j] = 'X'
    else:
        board[i][j] = 'O'
    return
def checkWin(board, ch, play):
    for i in range(3):
        if board[i][0] == ch and board[i][1] == ch and board[i][2] == ch:
            if play == 'player':
                print('Player ', ch, ' Wins!')
                return True
        if play == 'ai':
            print('Computer wins!')
            return True
    for i in range(3):
        if board[0][i] == ch and board[1][i] == ch and board[2][i] == ch:
            if play == 'player':
                print('Player ', ch, ' Wins!')
                return True
            if play == 'ai':
                print('Computer wins!')
                return True
    if (board[0][0] == ch and board[1][1] == ch and board[2][2] == ch) or (
        board[0][2] == ch and board[1][1] == ch and board[2][0] == ch):
        if play == 'player':
            print('Player ', ch, ' Wins!')
            return True
        if play == 'ai':
            print('Computer wins!')
            return True
    return False
print('AdjoinTheSpheres Main Menu')
while 1:
    print("1) New Game (2 player)")
    print("2) New Game (1 player vs computer)")
    print("3) Exit Game")
    choice = input("Select Option from the Menu: ")
    if choice not in ['1', '2', '3']:
        print("Please enter valid option")
        continue
    else:
        break
while (choice != '3'):
    while True:
        board = initialiseBoard()
# print("X plays first")
        turn = 0
        while turn < 9:
            if choice == '1':
                if (inputBoard(board, turn, 'player')):
                    continue
            elif choice == '2' and turn % 2 == 0:
                if (inputBoard(board, turn, 'player')):
                    continue
            elif choice == '2' and turn % 2 == 1:
                if (inputBoard(board, turn, 'ai')):
                    continue
            for i in range(3):
                for j in range(3):
                    if board[i][j] == '':
                        print('[ ]', ' ', end='')
                    else:
                        print('[', board[i][j], ']', ' ', end='')
                print()
            if turn % 2 == 0:
                if (checkWin(board, 'X', 'player')):
                    break
            if turn % 2 == 1 and choice == '1':
                if (checkWin(board, 'O', 'player')):
                    break
            if turn % 2 == 1 and choice == '2':
                if (checkWin(board, 'O', 'ai')):
                    break
            turn = turn + 1
            if turn == 9:
                print("Its a draw! Everybody sucks!")
        x = input("Want to play again? Press 1 for yes, anything else to exit out.")
        if x == '1':
            break
        else:
            print("Thank you for playing!")
            exit()
        choice = input("Select option\n1)Play against another player\n2)Play against computer\n3)Exit\n")

VB.NET times table

558fe5180e0e8fc922d31c23ef84d240

A teacher wants the program to:
show a visual representation of a multiplication
ask the child to key in an answer

E.G
3 x 4

What is the answer?

This is as far as I can go

Please help. I can't go horizontal. I only go vertical

Module Module1

    Sub Main()
        Dim a, b As Integer
        Dim star As String = "*"

        Dim rand As New Random
        a = rand.Next(1, 10)
        b = rand.Next(1, 10)

        Console.WriteLine(a & " X " & b)
        Dim sum As Double = a * b

        Dim i, x As Integer

        If a > b Then
            i = b
        Else
            i = a
        End If
        For x = 1 To i
            Console.Write(star)
            Console.WriteLine(star)
        Next
        Console.WriteLine()
        Console.WriteLine(sum)
        Console.ReadKey()
    End Sub

End Module

User interface design

558fe5180e0e8fc922d31c23ef84d240

I found this great article on User Interfaces that I wanted to share. Two points I wanted to add

  1. Just because it's old doesn't mean it's bad.
  2. Just because it's new doesn't mean it's better.

And can we please all decide that light grey text on a white background is just retarded?

How to mirror api result using file_get_contents but the output is pretty

558fe5180e0e8fc922d31c23ef84d240

Hello everone my name is reidho i have a problem with my code, i want to mirroring a api output from somesite using file_get_contents but the results is not like the original.

Original Result :
original.png
My Mirroring Result :
result.png
The Code :

$ping = "https://api.hackertarget.com/nping/?q=8.8.8.8";
$pingkeluar   = file($ping);
foreach ($pingkeluar as $pingnya) {
echo " $pingnya ";
}