i have error eol while scanning string literal

2024/11/17 5:24:36

i dont know what is the problem im junior on python programer what happened on my code i study but i dnt understand this

#fungsi coveragedef coverage ():print("[1] Kota Besar)print("[2] Kota suburban)kota = input("PILIH KOTA")if int (kota) == 1:frekuensi =  input("Masukan Frekuensi : )if int (frekuensi)<300;htower = float(input("input Tinggi tower : "))hpengguna =float (input("input Tinggi Pengguna : "))pathloss = float (input ("input Median Pathloss : "))logahre = math.log(1.54 * hpengguna, 10)**2)ahre =  8.29 * logahre - 1.1logfrek = math.log(frekuensi, 100loghte = math.log(htower, 10)pangkat = (-69.55-26.16*logfrek+13.82*loghte+ahre+pathloss)/44.9-(6.55 * loghte) print ("%s"%pangkat)   

EOL while scanning literal

Answer

So many syntax issues in your code. Here is a working code, all are very minor things like double quotes, semi column, brackets

#fungsi coveragedef coverage ():print("[1] Kota Besar")print("[2] Kota suburban")kota = input("PILIH KOTA")if int (kota) == 1:frekuensi =  input("Masukan Frekuensi : ")if int (frekuensi)<300:htower = float(input("input Tinggi tower : "))hpengguna =float (input("input Tinggi Pengguna : "))pathloss = float (input ("input Median Pathloss : "))logahre = math.log(1.54 * hpengguna, 10)**2ahre =  8.29 * logahre - 1.1logfrek = math.log(frekuensi, 100)loghte = math.log(htower, 10)pangkat = (-69.55-26.16*logfrek+13.82*loghte+ahre+pathloss)/44.9-(6.55 * loghte) print ("%s"%pangkat) 
https://en.xdnf.cn/q/118839.html

Related Q&A

How to extract specific data from JSON?

I cant seem to extract specific data from JSON which I retrieved from a link. I wrote this code and seems to work fine up to x [print(x) that is] as you can see from the screenshot-1. But, its giving e…

python csv: getting subset

here is a snapshot of my csv:alex 123f 1 harry fwef 2 alex sef 3 alex gsdf 4 alex wf35 6 harry sdfsdf 3i would like to get the subset of this data where the occurrence of a…

Variable within a Variable in Python (3)

My head is probably in the wrong place with this, but I want to put a variable within a variable.My goal for this script is to compare current versions of clients software with current software version…

selenium scraping data using children of elements

Hi im trying to scrape some data from a live stocks website. I want to display the companies name and stock price, %change ect. The details of 25 companies are shown per page, and these details follow …

Python - ETFs Daily Data Web Scraping

Im trying to web scrape some daily info of differents ETFs. I found that https://www.marketwatch.com/ have a accurate info. The most relevant info is the open Price, outstanding shares, NAV, total asse…

How to create DataFrame with columns based on scraped data?

import requests, re from bs4 import BeautifulSoupdata = []soup = BeautifulSoup(requests.get(https://www.booking.com/searchresults.html?label=gen173nr-1FCAEoggI46AdIM1gEaGyIAQGYATG4ARfIAQzYAQHoAQH4AQKI…

How do i change the colour of a button border tkinter

How do i change the colour of a border in tkinterI have looked at other solutions which recommended using highlightcolor and highlightbackground, however these did not work. excercises_button = Button(…

module object has no attribute Gridspec despite calling help(gridspec) revealing the Gridspec class

If I run the python console and doimport matplotlib matplotlib.__version__ import matplotlib.gridspec as gsI see that the matplotlib version is 1.2.1.If I do help(gs) I see the Gridspec class.However t…

Python division doesnt work as expected for large numbers [duplicate]

This question already has answers here:What class to use for money representation?(6 answers)Closed 9 months ago.I have three variables a, b and c. I want to make sure that after doing this: c -= a*bc…

working out an average of the values in a dictionary

My dictionary as of now is like this:class_1 = {Bob:[9,5,4,3,3,4], John:[5,5,7,3,6], Andy:[7,5,6,4,5], Harris:[3,4,2,3,2,3,2]}What i am trying to make it look like is this:class_1_average ={Bob:[averag…