Exemplo n.º 1
0
def get_positive_int():
    while True:
        result = get_int()
        if result > 0:
            break

    return result
Exemplo n.º 2
0
from inputs import get_int

n = get_int()

for i in range(n):
    print("hello")
Exemplo n.º 3
0
from inputs import get_int

x = get_int()

y = get_int()

if x == y:
    print(f"{x} is equal to {y}")

else:
    print(f"{x} is not equal to {y}")
Exemplo n.º 4
0
from inputs import get_int, get_string

n = get_int()

employees = []

for i in range(n):
    name = get_string("Enter a name > ")

    experience = get_int("Enter experience > ")

    employees.append({'name': name, 'experience': experience})


for e in employees:
    print(f"name : {e['name']}")
    print(f"experience : {e['experience']}")
Exemplo n.º 5
0
def main():
    scores = []
    for i in range(SIZE):
        scores.append(get_int())

    chart(scores, SIZE)
Exemplo n.º 6
0
from inputs import get_int


def chart(score_list):
    for i in range(len(score_list)):
        for j in range(score_list[i]):
            print("#", end="")
        print()


if __name__ == '__main__':
    scores = []
    for index in range(3):
        scores.append(get_int())

    chart(scores)
Exemplo n.º 7
0
from inputs import get_int

x = get_int("Enter a number > ")

y = get_int("Enter another number > ")

if x > y:
    print(f"{x} is greater than {y}")

elif x < y:
    print(f"{x} i less than {y}")

else:
    print(f"{x} is equal to {y}")