1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
loris [4]
2 years ago
13

░▒▓█►─═ ℍᵒ ═─◄█▓▒░ (っ◔◡◔)っ ♥ how are you doing ♥

Computers and Technology
1 answer:
Lera25 [3.4K]2 years ago
8 0
I’m not doing too hot
Stressing over school and I doesn’t help that I don’t understand somethings
You might be interested in
All cells in row 2 through 5 are referred as 2:5 true or false
Simora [160]
<h3>Answer:</h3><h2>TRUE</h2>

Explanation:

BRAINLIEST PLSSSSSSSSSSSSSSSSSSS

8 0
2 years ago
Write a function wordcount() that takes the name of a text file as input and prints the number of occurrences of every word in t
artcher [175]

Answer:

Explanation:

The following Python program uses a combination of dictionary, list, regex, and loops to accomplish what was requested. The function takes a file name as input, reads the file, and saves the individual words in a list. Then it loops through the list, adding each word into a dictionary with the number of times it appears. If the word is already in the dictionary it adds 1 to its count value. The program was tested with a file named great_expectations.txt and the output can be seen below.

import re

def wordCount(fileName):

   file = open(fileName, 'r')

   wordList = file.read().lower()

   wordList = re.split('\s', wordList)

   wordDict = {}

   for word in wordList:

       if word in wordDict:

           wordDict[word] = wordDict.get(word) + 1

       else:

           wordDict[word] = 1

   print(wordDict)

wordCount('great_expectations.txt')

4 0
3 years ago
This program is to compute and write to a file the GPA for student scores read from an input file. The point values of the grade
VARVARA [1.3K]

Answer:

#Take input from the user

filename=input('Enter name of input file: ')

total_units=0#Total number of units for a student

total_score=0#Total score of a student

#Assign a score to each grade. I have reduced 0.33 for each grade. Change here if you need to

grade={'A':4.0,'A-':3.67,'B+':3.34,'B':3.01,'B-':2.68,'C+':2.35,'C':2.02,'C-':1.69,'D+':1.36,'D':1.03}

try:

with open(filename,"r") as input_file:#Open the file for input(reading)

output_file=open("GPA_output.txt","w") #Create and open GPA_output.txt if it doesn't exist for writing

for student_record in input_file:#read from input file

if("," in student_record):#if there is a , that means this is the student name

student_name=student_record.strip('\n')#Remove \n from student name

continue

else:

if(" " in student_record):#If a line contains spaces then its the student's grades for a course

student=student_record.split(" ")#Split to find the coursename, units and grade

#student[0]=coursename student[1]=units student[2]=grade

total_units+=int(student[1])#Calculate total units for 1 student

total_score+=int(student[1])*grade[student[2].strip('\n')]#Find the total score of a student

#grade[student[2]] will lookup for the score that we initialized earlier

#if student has a grade as A then this will look up as grade['A'] which will return 4

#Find the total score as product of this grade and units for this course

continue

else:

if(total_units>0):#Check if score has been calculated for a student earlier

print("in")

GPA=total_score/total_units#Calculate the GPA

output_file.write("%-26s%.2f\n" % (student_name, GPA))#Write the GPA and Student Name in the required format

total_units=0#reset the units

total_score=0#reset the score

if(total_units>0):#Essential for the case when the file doesn't end with a new line(Check if total_units is not 0) which means a record is pending

#to be written to the file

GPA=total_score/total_units#Calculate the GPA

output_file.write("%-26s%.2f\n" % (student_name, GPA))#Write the GPA and Student Name in the required format

total_units=0#reset the units

total_score=0#reset the score

input_file.close()#Close the input file

output_file.close()#Close the output file

except IOError as e:

print("Problem in Opening the required file")#Print a message if file cannot be opened

Explanation:

The program has been tested for all 3 scenarios mentioned i.e.

a. If the file ends without \n

b. If the file ends with 2 \n

c. If the file ends with 1 \n

PS: The Program will run irrespective of how it ends. Even if there are many \n at the end of file, the program will be fine.

3 0
2 years ago
Which of the following is a geolocation service on an Internet browser?
seropon [69]
It may be D) because it is actually a simplified version of Google maps.
7 0
3 years ago
Read 2 more answers
Which of these categories of computer software can add thousands of dollars to the cost of a computer system?
Radda [10]
Specialized software. hope this helps
6 0
3 years ago
Other questions:
  • python (Business: check ISBN-10) An ISBN-10 (International Standard Book Number) consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. T
    12·1 answer
  • How can I code this in Python with only if-statements? (Only allowed to use the built-in functions int(), float(), and str().)
    8·1 answer
  • Discuss whether the redundant data should be addressed prior to beginning the wireless network architecture project, in coordina
    11·1 answer
  • What is the best option for sharing Word documents on a Microsoft network because it provides finer degrees of versioning contro
    6·1 answer
  • One blog may have a greater social influence than another when it has_______?
    12·2 answers
  • Please answer this correctly what’s the answer opening modify style dialog box enables you to
    8·1 answer
  • Your school has been declared a school of technology
    15·1 answer
  • The linear programming ingredient or blending problem model allows one to include not only the cost of the resource, but also th
    14·1 answer
  • Anyone play Ps4 and wanna run up some warzone or Gta? Im M 16 so dont be a creep... :) ill mark brainliest if you drop gamertag
    8·2 answers
  • Explain the consequences of using bits to represent data.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!