Skip to content

FavDress/project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LAB01

  1. Картинка1
name = input('Имя:')
age = int(input('Возраст:'))
next_age = age + 1
print(f'Привет, {name}! Через год тебе будет {next_age}.')
  1. Картинка2
a = input('a:')
b = input('b:')

x = float(a.replace(',','.'))
y = float(b.replace(',','.'))

sum1 = x+y
avg1 = round((x+y)/2, 2)
print(f'sum={sum1}; avg={avg1}')
  1. Картинка3
price = float(input('Цена(₽):'))
discount = float(input('Скидка(%):'))
vat = float(input('НДС(%):'))

base = price * (1-discount/100)
vat_amount = base * (vat/100)
total = base + vat_amount

base_r = round(base, 2)
vat_r = round(vat_amount, 2)
total_r = round(total, 2)

print("База после скидки:", base_r, "₽")
print("НДС:              ", vat_r, "₽")
print("Итого к оплате:   ", total_r, "₽")
  1. Картинка4
m = int(input('Минуты:'))
h = m//60
mn = m%60
if mn < 10:
    print(f'{h}:0{mn}')
else:
    print(f'{h}:{mn}')
  1. Картинка5
st = str(input()) 
ini = '' 
while '  ' in st: 
    st = st.replace('  ', ' ') 
st = st.strip() 
for a in st: 
    if a.isupper(): 
        ini += a 
 
 
print(ini) 
print(len(st))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages