Skip to content

Instantly share code, notes, and snippets.

@qtstm32fan
Last active September 25, 2020 14:44
Show Gist options
  • Save qtstm32fan/425c5df00378c64bf8a602ad4455ec3e to your computer and use it in GitHub Desktop.
Save qtstm32fan/425c5df00378c64bf8a602ad4455ec3e to your computer and use it in GitHub Desktop.
def str_multiply():
string = input('Введите строку:')
multiplier = int(input('Введите множитель:'))
return string*multiplier
def str_concatenate():
a = input('Введите первую строку:')
b = input('Введите вторую строку:')
return a+b
def str_simple():
operator = input('Введите оператор:')
if operator == '+':
print('Результат:', str_concatenate())
elif operator == '*':
print('Результат:', str_multiply())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment