Saturday, December 26, 2020

 def turn_right():

    turn_left()

    turn_left()

    turn_left()

    

def jump():

    turn_left()

    while wall_on_right():

          move()

    turn_right()

    move()

    turn_right()

    while front_is_clear():

              move()

    turn_left()

while not at_goal():

    if wall_in_front():

       jump()

    else:

        move()

Saturday, December 5, 2020

love calculator

print("Welcome to the Love Calculator!")
name1 = input("What is your name? \n")
name2 = input("What is their name? \n")
# 🚨 Don't change the code above 👆

#First *fork* your copy. Then copy-paste your code below this line 👇
#Finally click "Run" to execute the tests
t = (name1.count('t') + name2.count('t'))
r = (name1.count('r') + name2.count('r'))
u = (name1.count('u') + name2.count('u'))
e = (name1.count('e') + name2.count('e'))
total = str(t + r + u + e)

l = (name1.count('l') + name2.count('l'))
o = (name1.count('o') + name2.count('o'))
v = (name1.count('v') + name2.count('v'))
e = (name1.count('e') + name2.count('e'))
total1 = str(l + o + v + e)

score = int(total + total1)

if score <= 10 or score >= 90:
print(f'your score is {score} you are like coke and mentos')
elif score >= 40 and score <= 50:
print(f'your score is {score} you are alright together!')
else:
print(f'your score is {score}')

Saturday, November 28, 2020

 print('wellcome!')

bill = float(input('what is the total? '))
split = int(input('how many people are there? '))
tip = int(input('how much tip will you enter,10,12 or 15 euro? '))

bill_with_tip = tip / 100 * bill + bill
print(bill_with_tip)
result = (bill_with_tip / split)
total = round(result, 2)
print(f"each person should pay ${total}")

Friday, November 27, 2020

cost = input("how much is the bill? ")
total=int(cost)*1.125
print(total)
people=input("how many people you are? ")
share_perperson = total/int(people)
print(round(share_perperson, 2))

Thursday, November 26, 2020

 leftyears=(90-int(age))


print(f"You have {365*leftyears} days, {52*leftyears} weeks, and {12*leftyears} months left.")

Wednesday, November 25, 2020

 two_digit_number = input("Type a two digit number: ")

a = two_digit_number[0]
b = two_digit_number[1]

int_a = int(a)
int_b = int(b)

print(int_a + int_b)👍

Monday, March 30, 2020

coroa vierus

advises = []

for x in range(5):
    advise =input("this is what you have to do to stay away from covid 19  ")
    advises.append(advise)

for advise in advises:
    print(advise)

Thursday, February 20, 2020

birthday

birthday

theme = input("what is your birthday theme? ")
main_color = input("What is your main color? ")
guests_number = int(input("How many people are you inviting? "))

guests_name = []

for i in range(guests_number):
    message = "Please enter guest " + str(i + 1) + " name: "
    name = input(message)
    guests_name.append(name)
   

print("My birthday theme is " + theme)
print("My main color for the birthday is " + main_color)

for guest in guests_name:
    print("I would like to invite " + guest + " to come to my birthday on may 13th.")
   
   
print("I am looking forward to seeing you in my party :) :)")

Sunday, January 12, 2020

new year resolutions

def make_resolutions():
    year = input("What is the year?")
    number_of_goal = int(input("How many goals do you want to set for this yea?"))

    goals = list()
    # goals = []
    for i in range(number_of_goal):
        goal = input("Please enter your goal: ")
        goals.append(goal)


    print("\nHere is the resolutions for year ", year)
    print("---------------------------")
    for goal in goals:
        print(goal)

make_resolutions()

Wednesday, January 1, 2020

casino

import random

betters = []

number_of_people_str = input("How many people are betting? ")
number_of_people = int(number_of_people_str)

for better in range(number_of_people):
    betters.append(input("Enter the name of better: "))

betters.append("Casino")


amount_to_bet = int(input("How much do you want to bet? "))

round_to_bet = int(input("How many time do you want to bet? "))

total_amount = number_of_people * amount_to_bet


for round in range(round_to_bet):
    random_winner = random.randint(0,number_of_people)
    print(betters[random_winner]," won " ,total_amount)