This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| instructions=""" | |
| This is our TicTacToe Board | |
| 1 | 2 | 3 | |
| ---|---|--- | |
| 4 | 5 | 6 | |
| ---|---|--- | |
| 7 | 8 | 9 | |
| *Instructions: | |
| 1.Insert the number(1-9) | |
| 2.You Must fill all 9 spots to get the result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #guessing game using python | |
| import random | |
| import math | |
| l=int(input("Enter lower boundary:")) | |
| h=int(input("Enter upper boundary:")) | |
| num = random.randint(l, h) | |
| x=h-l+1 | |
| a=int(math.log(x,2)) | |
| while True: | |
| print(f'Guess a number between {l} and {h}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| QUESTION | |
| A robot moves in a plane starting from the original point (0,0). The robot can move UP, DOWN, LEFT, and RIGHT with given steps. Please write a program to compute the distance from the current position after a sequence of movements and the original point. If the distance is a float, then just print the nearest integer. | |
| Input Format: | |
| The first line of input consists of one string and one integer | |
| The second line of input consists of one string and one integer | |
| Same for the other new lines until the user enters a "STOP". | |
| Output Format: |
NewerOlder