Introduction to Functions program will not run from 6/13 7/13 8/13. Python

I have completed section 6/13. 7/13 in Introduction To Function, every time I hit run, the screen stays blank and will not show the program but will show any errors, any help would be appreciated.

Hey there and welcome to the forums! :slightly_smiling_face:

I don’t know if there was a typos here or not, if this was meant to say it’s showing errors could you post them here along with your code?


Is your code getting stuck in an infinite loop? It could still be helpful to post your code along with a link to the lesson.

Hi, thanks for the welcome.

it was a typo, I do get an error message if my code is incorrect but just a blank screen when I hit run.

Can you post your code, please?

yes sure,

Write your code below:

def calculate_expenses(plane_ticket_price, car_rental_rate, hotel_rate, trip_time):
car_rental_total = car_rental_rate * trip_time
hotel_total = hotel_rate * trip_time - 10
print(car_rental_total + hotel_total + plane_ticket_price)

calculate_expenses(200, 100, 100, 5)

Take a look at your indentation. It looks like your function call for calculate_expenses() is inside of calculate_expenses() body.

Thats great,
Thank you so much for your help.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.