<jupyter_start><jupyter_text>Control Structures  x = 5<jupyter_code>alist=["string",1]
x=5
y=7
if x<y:
    print("x is less than y")
else:
    print("x is greater than y")
a=5
b=7
c=10
if a>b+c:
    print("A is greater than b + c")
else:
    print("A is less than b + c")<jupyter_output>A is less than b + c<jupyter_text>Laboratory Practice<jupyter_code>temperature = int(input("What is the temperature in Celsisu? "))
if temperature > 40:
    print("It is hot outside")
print("Done")
userName = input("What is your name? ")
if userName=="Joseph":
    print("You have a nice name. ")
else:
    print("Your name is ok.")
a=33
b=33
if b>a:
    print("b is greater than a")
elif a==b:
    print("a and b are equal")
tempaerature = int(input("what is the temperature in Celsisus? "))
if temperature > 90:
    print("It is hot outside")
elif temperature < 30:
    print("It is cold outside")
else:
    print("It is not hot outside")
print("Done")
x = 41
if x > 10:
    print("Above ten,")
    if x > 20:
        print("and also above 20!")
    else:
        print("but not above 20.")
numbers = [1,2,4,6,11,20]
sq = 0
for val in numbers:
    sq = val * val
    print(sq)
for i in range(10):
    print(i)
for i in range(1,11):
    print(i)
for i in range(10):
    print(i+1)
for i in range(2,12,2):
    print(i)
for i in range(5):
    print((i + 1)*2)
i = 0
while i < 10:
    print(i)
    i = i + 1
    
i = 0
while i < 10:
    print(i)
    i += 1
done = False
while not done:
    quit = input("Do you want to quit? ")
    if quit == "y":
        done = True
        
attack = input("Does your elf attack the dragon? ")
if attack == "y":
    print("Bad choice, you died.")
    done = True
def check_guess(guess, answer):
    global score
    still_guessing = True
    attempt = 0
    while still_guessing and attempt < 3:
        if guess.lower() == answer.lower():
            print('Correct answer')
            score = score + 1
            stil_guessing = False
        else:
            if attempt < 2:
                guess = input('Sorry Wrong answer. Try again. ')

            attempt += 1
    if attempt == 3:
        print('The Correct answer is ',answer)
score = 0

print('Gues the Computer Quiz!')
guess1 = input('Which component controls the computer functions and transmits data?')
check_guess(guess1,'CPU')
guess2 = input('What is the meaning of ASCII? ')
check_guess(guess2, 'American Standard Code for Information Interchnage')
guess3 = input('Which Software helps to load the basic program automatically as soon as the computer is started?')
check_guess(guess3, 'Operating system')

print("Your score is",str(score))<jupyter_output><empty_output><jupyter_text>Project II<jupyter_code>from math import sqrt

print("Quadratic function: (a * x^2) + b*x +c ")
a = float(input("a: "))
b = float(input("b: "))
c = float(input("c: "))

r = b**2 - 4*a*c

if r>0:
    num_roots = 2
    x1 = (((-b) + sqrt(r))/(2*a))
    x1 = (((-b) - sqrt(r))/(2*a))
    print("There are 2 roots: %f and %f" %(x1,x2))
elif r == 0:
    num_roots = 1
    x = (-b)/2*a
    print("There is one root: ", x)
else:
    num_roots = 0
    print("No roots, discriminant < 0.")
    exit()<jupyter_output><empty_output><jupyter_text>Project IV: Nine Lives<jupyter_code>import random
lives = 9
words = ['lanes','tried','loved','blamed','scene','count','cults','blogg']
secret_word = random.choice(words)
clue = list('?????')
heart_symbol = u'\u2764'
guessed_word_correctly = False

def update_clue(guessed_letter, secret_word, clue):
    index = 0
    while index < len(secret_word):
        if guessed_letter == secret_word[index]:
            clue[index] = guessed_letter
        index += 1
diff = input('Choose difficulty (type 1, 2, or 3): \n 1 Easy \n 2 Normal \n 3 hard\n')
diff = int(diff)
if diff == 1:
    lives = 6
elif diff == 12:
    lives =9
else:
    lives=12

while lives>0:
    print(clue)
    print('Lives left: ',heart_symbol*lives)
    guess = input('Guess aletter or the whole word: ')
    if guess == secret_word:
        guessed_word_correctly = True
        break
    if guess in secret_word:
        update_clue(guess, secret_word, clue)
    else:
        print('Incorrect. You lose a life')
        lives -= 1
if guessed_word_correctly:
    print('You won! The secret word was ',secret_word)
else:
    print('You lost! The secret word was ',secret_word)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13989046097672295, 'fraction_numerical': 0.025559105431309903, 'mean_word_length': 3.123236124176858, 'pattern_counts': {'":': 3, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '42167', 'license': 'MIT', 'n_tokens_mistral': 1634, 'n_tokens_neox': 1540, 'n_words': 493, 'path': 'Control_structure.ipynb', 'repo_name': 'Zio-n/AnametiCSC101', 'size': '4382'}