Giet Cse AIML 3
Giet Cse AIML 3
ion
Num
ber
Lang Python
uage
Subto If-elif-else
pic
Type coding
Quest Write a Program to accept the cost price of a bike and display the
ion road tax to be paid according to the following criteria:
Descri Cost price (in Rs) Tax
ption above 1 lakh 15%
above 50 thousand and below 1 lakh 10%
Below 50 thousand 5%
print(tax)
Input 57000
1
Outp 5700.0
ut 1
Input 43000
2
Outp 2150.0
ut 2
Expla
natio
n
Diffic Easy
ulty
Quest 2
ion
Numb
er
Langu python
age
Subto If-elif-else
pic
Type coding
Input Atul
1 21
89
Input kiran
2 19
76
Expla
nation
Difficu Easy
lty
Que 3
stio
n
Num
ber
Lan Python
gua
ge
Type Coding
Cons 0<Classes<250
train
ts
Inpu 245
t1 198
Out allowed
put 1
Inpu 245
t2 138
Expl
anat
ion
Diffi Easy
culty
Que 4
stio
n
Nu
mb
er
Lan Python
gua
ge
Sub If-elif-else
topi
c
Typ Coding
e
Que ATM
stio
n
Title
Que Pooja would like to withdraw X rs from an ATM. The cash machine will only
stio accept the transaction if X is a multiple of 5, and Pooja’s account balance has
n enough cash to perform the withdrawal transaction (including bank charges).
Des For each successful withdrawal the bank charges 1.5 Rs. Calculate Pooja’s
crip account balance after an attempted transaction.
tion
First value in input would be initial balance and it is float, second value is
transaction amount.
Inp 120.0 30
ut 1
Out 88.50
put
1
Out 500.00
put
2
Expl
ana
tion
Diffi Easy
cult
y
Quest 5
ion
Num
ber
Lang Python
uage
Type coding
Quest A toy vendor supplies three types of toys: Battery Based Toys,
ion Key-based Toys, and Electrical Charging Based Toys. The vendor
Descri
gives a discount of 10% on orders for battery-based toys if the order
ption
is for more than Rs. 1000. On orders of more than Rs. 100 for
key-based toys, a discount of 5% is given, and a discount of 10% is
given on orders for electrical charging based toys of value more than
Rs. 500.
Assume that the numeric codes 1,2 and 3 are used for battery
based toys, key-based toys, and electrical charging based toys
respectively.
Write a program that reads the product code and the order amount
and prints out the net amount that the customer is required to pay
after the discount.
Const 0<Order_value<2000
raints
Input 2
1 500
Outp 475.0
ut 1
Input 3
2 1500
Outp 1350.0
ut 2
Expla
natio
n
Diffic Hard
ulty
Quest 6
ion
Num
ber
Lang Python
uage
Subto If-elif-else
pic
Type coding
Quest A cloth showroom has announced the following discounts on the purchase of
ion specific items :
Descri
ption
Amount Shorts Pants Shits/T-Shirts
0-100 – 3% 5%
101-200 5% 8% 10%
1. Ask user to enter the amount and assign following code for the items
such as (s) for shorts,(p) for pans and (t) for shirts/t-shirts.
2. Compute the discount and print the net amount paid by customer.
Const 0<Amount<1000
raints
Input 600
1 t
Outp 468.0
ut 1
Input 790
2 S
Outp 647.8
ut 2
Expla
natio
n
Diffic Hard
ulty
Ques 7
tion
Num
ber
Lang Python
uage
Subto If-elif-else
pic
Type coding
Quest BSNL has three categories of customers: Industrial, Bulk Institutional and Domestic.
ion The rates for these are tabulated below :
Descr
iption
Category Units Rate
print(bill)
calc_bill()
Input institutional
1 50000
Outp 13600.0
ut 1
Input domestic
2 342
Outp 484.0
ut 2
Expla
natio
n
Diffic Hard
ulty
Ques 8
tion
Num
ber
Lang Python
uage
Subt If-elif-else
opic
Type coding
1-50 8 Rs./Km
51-100 6 Rs./Km
Cons 0<distance<150
traint
s
Input 70
1
Outp 420
ut 1
Input 24
2
Outp 192
ut 2
Expla
natio
n
Diffic Medium
ulty
Ques 9
tion
Num
ber
Lang Python
uage
Type coding
Scoring
A player gets +1 point for each occurrence of the substring in the string S.
For Example:
String S = BANANA
Kevin's vowel beginning word = ANA
Here, ANA occurs twice in BANANA. Hence, Kevin will get 2 Points.
Cons 0<len(s)<20
traint
s
for i in range(len(s)):
for key,value in d.items():
if s[i] in value:
for i in range(i,len(s)):
count_vowel+=1
else:
for i in range(i,len(s)):
count_const+=1
if count_vowel>count_const:
print('Kevin',count_vowel)
elif count_vowel==count_const:
print('Draw')
else:
print('Stuart',count_const)
s = input()
minion_game(s)
Input PINEAPPLE
1
Outp Stuart 25
ut 1
Input ABACUS
2
Outp Kevin 12
ut 2
Expla
natio
n
Diffic Medium
ulty
Que 10
stion
Num
ber
Lang Python
uage
Subt If-elif-else
opic
Type coding
Que Six friends go on a trip and are looking for accommodation. After looking for
stion hours, they find a hotel which offers two types of rooms — double rooms and
Desc triple rooms. A double room costs Rs. X, while a triple room costs Rs. Y.
ripti
on The friends can either get three double rooms or get two triple rooms. Find the
minimum amount they will have to pay to accommodate all six of them.
Input Format
The first line contains a single integer
Output Format
For each testcase, output the minimum amount required to accommodate all
the six friends.
Cons 1<=T<=100
train
ts
1<=X<Y<=100
if (x*3)<(y*2):
print(x*3)
else:
print(y*2)
Inpu 3
t1 10 15
68
48
Outp 30
ut 1 16
12
Inpu 4
t2 10 4
10 26
40 13
51 20
Outp 8
ut 2 30
26
40
Expl
anati
on
Diffi Medium
culty