#Made by Caldora Scroll #Project: Numbers Game --> Started 12:20 5 December 2019 #Import Lines import math import random import turtle import time #Define Lines #Project: Numbers Game def game(Size): Confirm = input('Are you cerain you want your Grid to be', Size, 'Wide and Tall?').lower() while Confirm != 'yes' or Confirm != str(Confirm): Size = input('How long do you want the sides of your playing field to be? (It will be a Square)') Confirm = input('Are you cerain you want your Grid to be', Size, 'Wide and Tall?').lower() X = Size Y = Size Number = (Size**2)-1 L = 1 for i in range(Number): Grid_Choice.append(str(L)) L += 1 for x in range(len(Grid_Choice)): Grid.append(random.choice(Grid_Choice)) print(Grid) return "hi" #Project: #Variable Lines #Project: Numbers Game Size = 0 Grid_Choice = [''] Grid = [] L = 0 X = 0 Y = 0 #Project: #Work Lines #Project: Numbers Game print('Input Numbers(Size of the Board)') game(5)
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question