コード例 #1
0
import cowsay
cowsay.kitty("I'm an effective-image")
コード例 #2
0
ファイル: hello.py プロジェクト: Lemmons/z-example
def say_hello(name):
    cowsay.kitty(f'hello {name}')
コード例 #3
0
ファイル: gen.py プロジェクト: Rctz/Password-generator-python
# -*- coding: utf-8 -*-
import string
import random
import cowsay

char = string.ascii_letters + string.digits + string.punctuation  # letter + number + spacial char
password = ""
cowsay.kitty("Password generator by Rctz :)")

try:
    name = input("Use for: ")  # input use for
    length = int(input("Password length: "))  # input password length
    for i in range(length):
        password += random.choice(char)  # random

    print(password)
    with open("password.txt", mode="a+") as f:  # write to .txt
        f.write(name + "\n")
        f.write(password + "\n\n")

except ValueError:  # if wrong password length
    print("Error!: please correct password length")
コード例 #4
0
ファイル: h.py プロジェクト: WeronikaManista/cw_kwiecien
while True:
    num1 = input("Kalkulator\nDana_1: ")
    oper = input("Operacja: +, -, :, *: ")
    num2 = input("Dana_2: ")

    if oper == "+":
        # dodaj = int(num1) + int(num2)
        wynik = funkcja_dodawania(num1, num2)

        zapamietaj = zapamietaj + wynik
        cowsay.cow(f"= {wynik}")
        print(zapamietaj)

    elif oper == "-":
        odejmij = int(num1) - int(num2)
        wynik = funkcja_odejmowania(num1, num2)
        cowsay.dragon(f"= {wynik}")

    elif oper == "*":
        mnoz = int(num1) * int(num2)
        wynik = funkcja_mnozenia(num1, num2)
        cowsay.ghostbusters("= %s" % wynik)

    elif oper == '/':
        dziel = int(num1) / int(num2)
        wynik = funkcja_dzielenia(num1, num2)
        cowsay.kitty("= {}".format(wynik))

    else:
        print("Nie ma takiej mozliwosci")
コード例 #5
0
async def kitty(ctx, *, text):
    await ctx.send('```' + cowsay.kitty(text) + '```')
コード例 #6
0
import cowsay
# print(cowsay.char_names)
name = input('Enter your name : ')
string = f'Hello {name}'

cowsay.daemon(string)
cowsay.cow(string)
cowsay.dragon(string)
cowsay.beavis(string)
cowsay.cheese(string)
cowsay.ghostbusters(string)
cowsay.kitty(string)
cowsay.meow(string)
cowsay.milk(string)
cowsay.pig(string)
cowsay.stegosaurus(string)
cowsay.stimpy(string)
cowsay.turkey(string)
cowsay.turtle(string)
cowsay.tux(string)