A
A
Akim Savvin2020-05-06 15:27:03
Python
Akim Savvin, 2020-05-06 15:27:03

Why does an error occur on an empty line python?

String is empty but error occurs WTF?

#Website price calculator
#Version 3.0
#Developed by Savvin Akim
#Follow me on Vkontakte, Facebook and Instagram
#

import time

Block_cost = 40
Main_page_cost = 200
Page_cost = 100
Repeated_page_cost = 50

website_type = input(
    "Which website type do you need?\nLanding page, Multipage, Webshop\n")

if website_type == "Landing page":
    blocks_amount = input("How many blocks do you need?\n")
    print("Counting..")
    time.sleep(2)
    print("Well, the price is " + str(int(blocks_amount)*40) + "€")
elif website_type == "Multipage":
    pages_amount = input("How many pages do you need?\n")
    print("Counting..")
    time.sleep(2)
    print("Well, the price is " + str((int(pages_amount)-1)*100+200) + "€")
elif website_type == "Webshop":
    pages_amount = input("How many pages do you need?\n")
    products_amount = input("How many products will be in website?")
    sections_amount = input("How many sections will be in website?")
    print("Counting..")
    time.sleep(2)
    print("Well, the price is " + str((int(pages_amount)-1) * 100+200+(int(products_amount)+int(sections_amount))*15) + "€"


Error:
python calculator_3.0.py
File "calculator_3.0.py", line 34

^
SyntaxError: unexpected EOF while parsing

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2020-05-06
@Akim41k

Forgot to put a parenthesis at the end of the last line.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question