Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- зад.1
- number = int(input())
- if number == 1:
- print("Monday")
- elif number==2:
- print("Tuesday")
- elif number==3:
- print("Wednesday")
- elif number==4:
- print("Thursday")
- elif number==5:
- print("Friday")
- elif number==6:
- print("Saturday")
- elif number==7:
- print("Sunday")
- else:
- print("Wrong number!")
- зад.2
- day=input("Въведете ден:")
- if day == "Monday":
- print("Study day")
- elif day == "Tuesday":
- print("Study day")
- elif day == "Wednesday":
- print("Study day")
- elif day == "Thursday":
- print("Study day")
- elif day == "Friday":
- print("Study day")
- elif day == "Saturday":
- print("Weekend")
- elif day == "Sunday":
- print("Weekend")
- else:
- print("Wrong day")
- зад.3
- student_number = input("Enter a student number: ")
- if student.startswith("23"):
- print("I-ви курс")
- elif student.startswith("22"):
- print("II-ри курс")
- elif student.startswith("21"):
- print("III-ти курс")
- elif student.startswith("20"):
- print("IV-ти курс")
- elif student.startswith("19"):
- print("V-ти курс")
- else:
- print("There is no such student number!")
- зад.4
- age=float(input("въведете възраст "))
- gender=input("Моля въведете пол m или f: ")
- if gender=="m":
- if age>=16:
- print("Mr.")
- else:
- print("Master")
- elif gender=="f":
- if age>=16:
- print("Ms.")
- else:
- print("Miss")
- else:
- print("Невалиден вход!")
- зад.5
- place=input(("input place"))
- product=input(("Input product"))
- quantity=float(input("enter quantity "))
- if place=="School":
- if product.lower()=="coffee":
- print(quantity * 0.50)
- elif product.lower()=="water":
- print(quantity * 0.80)
- elif product.lower()=="beer":
- print(f"{(quantity * 1.20):.1f}")
- elif product.lower()=="sweets":
- print(f"{(quantity * 1.45):.1f}")
- elif product.lower()=="peanuts":
- print(quantity * 1.60)
- else:
- print("There is no such product!")
- elif place=="Dormitory":
- if product.lower()=="coffee":
- print(quantity * 0.40)
- elif product.lower()=="water":
- print(quantity * 0.70)
- elif product.lower()=="beer":
- print(quantity * 1.15)
- elif product.lower()=="sweets":
- print(quantity * 1.30)
- elif product.lower()=="peanuts":
- print(quantity * 1.50)
- else:
- print("There is no such product!")
- elif place=="Bus-station":
- if product.lower()=="coffee":
- print(quantity * 0.45)
- elif product.lower()=="water":
- print(quantity * 0.70)
- elif product.lower()=="beer":
- print(quantity * 1.10)
- elif product.lower()=="sweets":
- print(quantity * 1.35)
- elif product.lower()=="peanuts":
- print(quantity * 1.55)
- else:
- print("There is no such product!")
- else:
- print("Wrong")
- зад.6
- number=int(input("въведете число: "))
- if -100<=number<=100:
- if number== -1 or number==0 or number==1:
- print("No")
- else:
- print("Yes")
- else:
- print("No")
- зад.7
- hour=int(input("Въведи час "))
- day=input("Въведи ден ")
- if day.lower() == "Неделя":
- print("Затворено")
- elif hour>=13 and hour<15:
- print("Затворено")
- elif hour>=7 and hour<17:
- print("Отворено")
- else:
- print("Затворено")
- зад.8
- day = input("Въведете ден от седмицата: ")
- if day=="Monday" or day=="Tuesday" or day=="Friday":
- print("12leva")
- elif day=="Wednesday" or day=="Thursday":
- print("14leva")
- elif day=="Saturday" or day == "Sunday":
- print("16leva")
- else:
- print("Невалиден ден")
- зад. 9
- product=input("Въведете продукт: ")
- if product=="banana" or product=="apple" or product=="kiwi" or product=="cherry" or product=="lemon" or product=="grapes":
- print("fruit")
- elif product=="tomato" or product=="cucumber" or product=="pepper" or product=="carrot":
- print("vegetable")
- else:
- print("unknown")
- зад.10
- number=int(input("Въведете число: "))
- if 100>number or number>200 or number%2==0:
- print("Invalid number")
- else:
- print("Valid number")
- зад.11
- fruit=input("Въведете плод: ")
- day=input("ден от седмицата: ")
- quantity=float(input("Въведете количество: "))
- price=0
- if day=='Monday' or day=='Tuesday' or day == 'Wednesday' or day=='Thursday' or day== 'Friday':
- if fruit=='banana':
- price=2.50
- elif fruit=='apple':
- price=1.20
- elif fruit=='orange':
- price=0.85
- elif fruit=='grapefruit':
- price=1.45
- elif fruit=='kiwi':
- price=2.70
- elif fruit=='pineapple':
- price=5.50
- elif fruit=='grapes':
- price=3.85
- elif day=='Saturday' or day=='Sunday':
- if fruit=='banana':
- price=2.70
- elif fruit=='apple':
- price=1.25
- elif fruit=='orange':
- price=0.90
- elif fruit=='grapefruit':
- price=1.60
- elif fruit=='kiwi':
- price=3.00
- elif fruit=='pineapple':
- price=5.60
- elif fruit=='grapes':
- price=4.20
- if price == 0:
- print('error')
- else:
- total = price * quantity
- print(f"{total:.2f}")
- зад. 12 господине не можах да я направя, ако я разбера ще ви я пратя. Данните от таблицата не ги разбирам.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement