Skip to content

Instantly share code, notes, and snippets.

@klamfa
Last active October 28, 2019 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klamfa/3e4a48bcd05dd6a2e1159f94db3e28b7 to your computer and use it in GitHub Desktop.
Save klamfa/3e4a48bcd05dd6a2e1159f94db3e28b7 to your computer and use it in GitHub Desktop.
MVisnikar Homework 1
mood = input("How are you feeling? I don't have that much emotional inteligence, so your options are: happy, sad, excited, relaxed and nervous! Enter one here! ")
if mood == "happy":
print("It is great to see you happy!")
elif mood == "sad":
print("Watch an episode of Friends, it'll help.")
elif mood == "excited":
print("I'm excited you're excited!.")
elif mood == "relaxed":
print("Chill with your friends!")
elif mood == "nervous":
print("Take 3 deep breaths!")
else:
print("I don't recognize this mood.")
secret = 5
guess = int(input("Guess the secret number (between 1 and 30): "))
if guess == secret:
print("You've guessed it - congratulations! It's number 5.")
else:
print("Sorry, your guess is not correct... The secret number is not " + str(guess))
first_number = int(input('Enter your first number here: '))
operator = input('What operation do you want to do? +, -, * or /? ')
second_number = int(input('Enter your second number here: '))
result = None
if operator == "+":
result = (first_number + second_number)
elif operator == "-":
result = (first_number - second_number)
elif operator == "*":
result = (first_number * second_number)
elif operator == "/":
result = (first_number / second_number)
else:
result = "You didn't enter a valid operator"
print(result)
@isrdoc
Copy link

isrdoc commented Oct 27, 2019

No need for extra blank lines in homework1-3 (at lines 8, 11, 14 and 17).
Other than that everything looks very good! Good work!

@klamfa
Copy link
Author

klamfa commented Oct 28, 2019

Fixed it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment