Cool Python Project 5: Car Shopping

Hi Everyone! Welcome to Cool Python Projects!
In this post I will be showing you how to make a Birthday Estimator in Python. Please remember to follow me to stay updated on any new projects.

Python Code:

print(‘@*@*@*@*@*@*@*@*@*@*@*@*@*@*’)

print…


This content originally appeared on DEV Community and was authored by Abhi Develops - SunTech

Hi Everyone! Welcome to Cool Python Projects!
In this post I will be showing you how to make a Birthday Estimator in Python. Please remember to follow me to stay updated on any new projects.

Python Code:

print('@*@*@*@*@*@*@*@*@*@*@*@*@*@*')

print('CAR TIME')

print('Welcome Shopper - Lets take you on a car shopping journey!!!')

print()

print('Zoooooooooooooooooooooommmmmmmmmmm!')

print('@*@*@*@*@*@*@*@*@*@*@*@*@*@*')

print('')

user_car = input('Do you want a) sports car, b) a luxury car,or a c) normal car d) Nothing? Enter a,b,c,or d - ')

#just giving value to variables to start with

user_like = 'az'

if user_car == 'd':

  print('Bye Bye!')

  exit()

#code for sports car

if user_car == 'a':

    print('Welcome Sports Car shopper')

    user_money= input('How much money do you want to spend (in million dollars?)')

    user_money_int = int(user_money)

    user_model = input('Choose from these cars - a) Bugatti Chiron; b) Lamborghini Huracan c) Bugatti Divo,Choose a,b or c - ')

    if user_model== 'a':

      number_of_cars = (user_money_int)/3

      car_name = 'Bugatti Chiron'

    elif user_model == 'b':

      number_of_cars = (user_money_int)/0.5

      car_name = 'Lamborghini Huracan'

    elif user_model == 'c' :

        number_of_cars = (user_money_int)/6

        car_name = 'Bugatti Divo'

    print('***** You can buy {0} {1} '.format(number_of_cars,car_name))

#Chiron = 3M, Huracan = 0.3M, Divo = 6M

print()

#code for luxury car

if user_car == 'b':

   print('Welcome Luxury Car shopper')

   user_money2=input('How much money do you want to spend(in millions?) ')

   user_money2_int = int(user_money2)

   user_model2 = input('Choose from these cars - a) Rolls Royce; b) Audi c) BMW, choose a,b,or c - ')

   if  user_model2 == 'a' or 'Rolls Royce':

       number_of_cars2 = (user_money2_int)/1

       car_name= 'Rolls Royce'

   elif user_model2 =='b' or 'Audi':

        number_of_cars2 = (user_money2_int)/0.1

        car_name = 'Audi'

   elif user_model2 =='c' or 'BMW':

        number_of_cars2 = (user_money2_int)/0.2

        car_name = 'BMW'

   print('***** You can buy {0} {1} cars'.format(number_of_cars2,car_name))

#Royce = 1M, Audi = 0.1M , BMW = 0.2M

print()

#code for normal car

if user_car == 'c':

   print('Welcome Normal Car shopper')

   user_money3= input('How much money do you want to spend(in thousand dollars)?')

   user_money3_int = int(user_money3)

   user_model3 = input('Choose from these cars - a) Toyota Corolla; b) Nissan Altima c) Honda Accord, choose a,b,or c - ')

   if user_model3 == 'a' :

       number_of_cars3 = (user_money3_int)/19.6

       car_name = 'Toyota Corolla'

   elif user_model3 == 'b' :

       number_of_cars3 = (user_money3_int)/21.1

       car_name = 'Nissan Altima'

   elif user_model3 == 'c' :

       number_of_cars3 = (user_money3_int)/20

       car_name = 'Honda Accord'

   print('***** You can buy {0} {1} cars'.format(number_of_cars3,car_name))

#Toyota = 19.6K, Nissan = 21.1K, Honda = 20K

print('***** Hope you enjoyed shopping with us *****')

print()

if user_car !='d':

   user_like = input('How did you like the experience of shopping a car?   a)  GOOD OR b) BAD? ')

if  user_like == 'a':

   print('Thanks! We are sooooooooo happy to see you happy!')

else: print('I will someday make you feel that you like this Car Shopper!')

I hope you enjoyed this Python project.

All the projects code in the series


This content originally appeared on DEV Community and was authored by Abhi Develops - SunTech


Print Share Comment Cite Upload Translate Updates
APA

Abhi Develops - SunTech | Sciencx (2021-12-07T02:18:35+00:00) Cool Python Project 5: Car Shopping. Retrieved from https://www.scien.cx/2021/12/07/cool-python-project-5-car-shopping/

MLA
" » Cool Python Project 5: Car Shopping." Abhi Develops - SunTech | Sciencx - Tuesday December 7, 2021, https://www.scien.cx/2021/12/07/cool-python-project-5-car-shopping/
HARVARD
Abhi Develops - SunTech | Sciencx Tuesday December 7, 2021 » Cool Python Project 5: Car Shopping., viewed ,<https://www.scien.cx/2021/12/07/cool-python-project-5-car-shopping/>
VANCOUVER
Abhi Develops - SunTech | Sciencx - » Cool Python Project 5: Car Shopping. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/07/cool-python-project-5-car-shopping/
CHICAGO
" » Cool Python Project 5: Car Shopping." Abhi Develops - SunTech | Sciencx - Accessed . https://www.scien.cx/2021/12/07/cool-python-project-5-car-shopping/
IEEE
" » Cool Python Project 5: Car Shopping." Abhi Develops - SunTech | Sciencx [Online]. Available: https://www.scien.cx/2021/12/07/cool-python-project-5-car-shopping/. [Accessed: ]
rf:citation
» Cool Python Project 5: Car Shopping | Abhi Develops - SunTech | Sciencx | https://www.scien.cx/2021/12/07/cool-python-project-5-car-shopping/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.