Last active
October 15, 2021 06:21
-
-
Save mhassanist/bcdbaad67bb58e85aee2a7c54e932ec2 to your computer and use it in GitHub Desktop.
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
#DON'T just look at the code or copy it. Solve it yourself first | |
import turtle | |
rex = turtle.Turtle() | |
rex.color("green") | |
radius = int(input("Enter the radius of the circle: ")) | |
rex.circle(radius) | |
############################## | |
user_input = input('Enter a number: ') | |
x = int(user_input) | |
if x == 4 : | |
print('It\'s 4') | |
print('It\'s four') | |
else: | |
print("It's not 4") | |
############################## | |
#https://stackoverflow.com/questions/5424716/how-to-check-if-string-input-is-a-number | |
#https://docs.python.org/3/library/stdtypes.html#str.isdigit | |
num = 4 | |
guessed_num = int(input('please input your guessed number: ')) | |
if guessed_num == num: | |
print('Yay! You guessed correctly') | |
elif guessed_num > num: | |
print('Your number is greater that mine') | |
else: | |
print('Your number is smaller that mine') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment