diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/100DaysOfPython.iml b/.idea/100DaysOfPython.iml new file mode 100644 index 0000000..081c358 --- /dev/null +++ b/.idea/100DaysOfPython.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..cec1829 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..3c92a27 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Exercise.py b/Exercise.py new file mode 100644 index 0000000..2387f66 --- /dev/null +++ b/Exercise.py @@ -0,0 +1,3 @@ +a = 5 +b = a += 2 +print(a) \ No newline at end of file diff --git a/Hangman.py b/Hangman.py new file mode 100644 index 0000000..c44356f --- /dev/null +++ b/Hangman.py @@ -0,0 +1,49 @@ +import random + +# Create a List + +word_list = ["aardvark", "baboon", "camel"] + +# Randomly select the word in the list to a variable + +chosen_word = random.choice(word_list) + +# Creating an empty list +display = [] + +print(chosen_word) + +# Print out the Guess Letter +print("Guess a Letter: ", end="") + +# Take input from the user from the Keyboard +guess = input() + +# change the input character from Capital letter to Lowercase letter of the use input +guess = guess.lower() + +count = 0 + +for char in chosen_word: + # display += "_" + display.append("_") +print(display) + +# for num in range(len(chosen_word)): +# # for check in chosen_word: +# count = count + 1 +# print(count) +for check in range(len(chosen_word)): + if guess in chosen_word[check]: + display[check] = guess + + + # for check in chosen_word: + # # print(num) + # if guess in check: + # print(num) + # print("Yes") + # else: + # print("No") + +print(display) diff --git a/Hurdle4_Task.py b/Hurdle4_Task.py new file mode 100644 index 0000000..0581867 --- /dev/null +++ b/Hurdle4_Task.py @@ -0,0 +1,41 @@ +def turn_right(): + turn_left() + turn_left() + turn_left() + + +def jump(): + turn_left() + move() + turn_right() + move() + turn_right() + move() + turn_left() + + +def jump_high(): + turn_left() + move() + turn_right() + + +def down(): + move() + turn_right() + + +while not at_goal(): + while not wall_on_right(): + turn_right() + move() + if wall_in_front() and not right_is_clear(): + turn_left() + if wall_on_right() and wall_in_front(): + jump_high() + if front_is_clear(): + down() + if not front_is_clear(): + turn_left() + else: + move() \ No newline at end of file