|
1 | 1 | #Code by Ekta Kapase
|
2 |
| -print("Welcome to Python Pizza Deliveries!") |
3 |
| -size = input("What size pizza do you want? S, M, or L ") |
4 |
| -add_pepperoni = input("Do you want pepperoni? Y or N ") |
5 |
| -extra_cheese = input("Do you want extra cheese? Y or N ") |
| 2 | +print("Welcome to the Love Calculator!") |
| 3 | +name1 = input("What is your name? \n") |
| 4 | +name2 = input("What is their name? \n") |
6 | 5 |
|
7 |
| -bill = 0; |
| 6 | +name1= name1.lower() |
| 7 | +name2= name2.lower() |
| 8 | +combined_name= name1 + name2 |
8 | 9 |
|
9 |
| -#size |
| 10 | +count_t = combined_name.count("t") |
| 11 | +count_r = combined_name.count("r") |
| 12 | +count_u = combined_name.count("u") |
| 13 | +count_e = combined_name.count("e") |
10 | 14 |
|
11 |
| -if size == "S": |
12 |
| - bill = 15 |
13 |
| -elif size== "M": |
14 |
| - bill = 20 |
15 |
| -elif size== "L": |
16 |
| - bill = 25 |
17 |
| - |
18 |
| -#pepperoni |
19 |
| - |
20 |
| -if add_pepperoni == "Y": |
21 |
| - if size=="S": |
22 |
| - bill +=2 |
23 |
| - else: |
24 |
| - bill+= 3 |
| 15 | +count_l = combined_name.count("l") |
| 16 | +count_o = combined_name.count("o") |
| 17 | +count_v = combined_name.count("v") |
25 | 18 |
|
26 |
| -#cheese |
27 |
| - |
28 |
| -if extra_cheese == "Y": |
29 |
| - bill +=1 |
30 |
| - |
31 |
| -#final_bill |
32 |
| - |
33 |
| -print(f"Your final bill is {bill}.") |
34 |
| -print("Thanks for ordering!") |
35 | 19 |
|
| 20 | +tens_place = str(count_t + count_r + count_u + count_e) |
| 21 | +ones_place = str(count_l + count_o + count_v + count_e) |
36 | 22 |
|
| 23 | +score = (tens_place) +(ones_place) |
| 24 | +score = int(score) |
37 | 25 |
|
| 26 | +if 90<score<10: |
| 27 | + print(f"Your score is {score},you go together like coke and mentos.") |
| 28 | +elif 40<score<50: |
| 29 | + print(f"Your score is {score}, you are alright together.") |
| 30 | +else: |
| 31 | + print(f"Your score is {score}.") |
0 commit comments