Strona 1 z 1

Python - jak napisać kod

: 12 lis 2022, 17:32
autor: JanKowalski333
Jak napisać kody w Pythonie?

1. Write a program that prints

AAAAAAAAAABBBBBBBCDCDCDCDEFFFFFFG

2. Use a for loop to print an upside down triangle like the one below. Allow the user to specify how high the triangle should be.

****
***
**
*

Re: Python - jak napisać kod

: 12 lis 2022, 18:35
autor: grdv10
1. print('AAAAAAAAAABBBBBBBCDCDCDCDEFFFFFFG')

2.

Kod: Zaznacz cały

n=int(input())
stars='*'*n
for k in range(n):
    print(stars[0:n-k])