Skip to content

Instantly share code, notes, and snippets.

@Quadriphobs1
Created May 1, 2021 16:47
Show Gist options
  • Select an option

  • Save Quadriphobs1/a1eeee7bb3cb377601065d425689329c to your computer and use it in GitHub Desktop.

Select an option

Save Quadriphobs1/a1eeee7bb3cb377601065d425689329c to your computer and use it in GitHub Desktop.
Quadri<>Raimot: Python Practice
def print_hello_world():
print("Hello world")
print_hello_world()
def calculate_100_x_200():
ans = 100 * 200
print("The value is ", ans)
print_hello_world()
calculate_100_x_200()
def calculate_a_plus_b(valueA, value_b):
ans = valueA + value_b;
print("The addition of ", valueA, "plus", value_b, " = ", ans)
calculate_a_plus_b(10, 20)
a = 50
b = 40.50
calculate_a_plus_b(a, b)
def add_two_numbers(a, b):
if (b == 10):
return a + 5
if (a == 5):
return 10 + b
return a + b
two_words = add_two_numbers(10, 20)
print(two_words)
def guess_what(answer):
hidden_value = "89"
if (answer == hidden_value):
return "🎉 Tada you are right"
else:
return "😡 You got it wrong"
user_value = input("Guess your card number? ")
print(guess_what(user_value))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment