Write a program that reads in from a file a starting month name, an ending month name, and then the monthly rainfall for each month during that period. As it does this, it should sum the rainfall amounts and then report the total rainfall and average rainfall for the period. For example, the output might look like this: During the months of March–June, the total rainfall was 7.32 inches and the average monthly rainfall was 1.83 inches.
Q: Write a java program called PalinPerfect that finds all palindrome perfect squares between two…
A: Code : import java.util.Scanner; public class PalinPerfect { public static void main(String[]…
Q: write a program that displays, in ascending order,the first names of those students who have…
A: Step 1:- In the question does not show in which language write the program therefor above program…
Q: Write a python code for "Open the text oneArt.txt, read the text line by line and, at the end, print…
A: Here is the code in Python:
Q: Write a Python program to create a Caesar encryption, user will input the message Note : In…
A: Program 1 : Step 1 : Start Step 2 : Define the encrypt_cypher() function , which takes the message…
Q: Write a program that reads a number and finds it is a prime or not. 0. A prime number is a number…
A: Below is the required program in C++ language. Program Approach: Include header files and use…
Q: Write a Matlab program in a script file that finds and displays all the numbers between 700 and…
A: % initialize vector to store number whose digits sum=6product vect=[]; % initialize count count=0;…
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Given: Write a program that takes a date as input and outputs the date's season. The input is a…
Q: Write a program that reads the price and the production date(month and year of an item) then prints…
A: import java.util.*;import java.io.*; public class Main{ public static void main(String[] args)throws…
Q: Write a program that will assign a suitable name to a given RGB triplet. Your names must be a hue…
A: # # Write a program that will assign a suitable name to a given RGB triplet. Your names must be a#…
Q: Write a Python program to count the number of lines in a text file. Then, finally print the total…
A: Answer of the given question: The required python program: OUTPUT:
Q: 1. Create a file with given numbers. Read them from file with a python program and calculate mean,…
A: Task : Load the data Find and plot mean variance standard deviation
Q: Write a program that reads three numbers and prints "all the same" if they are all the same, "all…
A: Please find the answer below :
Q: Write a program that can be used by a small theater to sell tickets for performances. The theater’s…
A: Introduction: In this question, we have to write a program that asked for the prices of each seat of…
Q: Write a python program that Take a lowercase word as an input from the user. Modify the word in such…
A: According to the question, here is your answer
Q: In Python, write an improved version of the chaos.py program that allows a user to input 2 initial…
A: print("Tis program illustrates a chaotic funstion") x=eval(input("Enter a first number between 1 and…
Q: Sites like Zillow get input about house prices from a database and provide nice summaries for…
A: Programs: The main objective of the programs is to provide interaction and problem-solving. Even…
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Please find the answer below :
Q: Write a program that reads in two hexadecimal numbers prints out the sum of the two numbers in…
A: Program Without using file #include <bits/stdc++.h>using namespace std; // Map for converting…
Q: This is for Coral. Sites like Zillow get input about house prices from a database and provide nice…
A: Implement the program as follows: Declare variablesread current_price and last_month_price from…
Q: A scanner in the department stores reads in the following string (simulate with file input)…
A: Actually, the code has given below:
Q: Write a Python program that takes a word as an input from the user and does the following. While…
A: """Program to takes a word as input and print spaces after each letter and ASCII value""" #get the…
Q: Write a program that displays an inchworm on the left-hand side of the screen, facing right. Then…
A: According to the information given:- We have to display inchworm on the left side of the screen…
Q: Solve in Python: Write a program that creates a login name for a user, given the user's first name,…
A: Here I have taken input from the user and stored it into 3 different variables. Next, I have…
Q: write a program that read an excel sheet that contains some animals' information. The information…
A: Below is the Python program for:- write a program that read an excel sheet that contains some…
Q: Write a Java program that read all the records from file and print atom state for each line in…
A: Solution - Programming language used: Java All necessary comments are included in program code.…
Q: Write a program that reads a person's first and last names, separated by a space. Then the program…
A: The program will read entered name and stores into a variable. using the split method, it splitas…
Q: Write a program that reads multiple blood sugar rates for a patient for multiple visits to a…
A: #include <bits/stdc++.h>using namespace std; int main(){ vector<float> sugar_rate;…
Q: Write a program that reads an integer and displays all its smallest factors in increasing order. For…
A: start input number find smallest factors for(int i=2;i<=num;) { if(num%i==0) {…
Q: Write a program to read in a collection of 5 exam scores ranging from 1 to 100. Your program should…
A: Program plan: Create an array and declare the respective variables Prompt for the 5 numbers from…
Q: Sites like Zillow get input about house prices from a database and provide nice summaries for…
A: Given the source code Take the input of house prices And compute monthly mortgage.
Q: Write a Java program that uses the coordinates.txt file in your project directory. Each line of this…
A: Hey there, I am writing the required solution for the above stated question.
Q: Write a program that calculates and prints the bill for a cellular telephone company. The company…
A: C++ Code: #include <iostream>#include <iomanip> using namespace std;int main(){ int…
Q: Write a program that coverts a zip code to a bar code. The bar codes use large and small bars. We…
A: Solution:#Define the functiondef checksum(zip): #Declare the empty variable sum = 0 #Loop…
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Please find the answer below :
Q: Write a program that takes in an integer in the range 11-100 as input. The output is a countdown…
A: Hi. There is a very small change required in the provided code. Let's fix it in the next step.
Q: Write a program that will read a line of text and output the number of words in the line and the…
A: #include<iostream>#include<cstring>#include<cctype>using namespace std; int…
Q: Write a program that reads an integer age of kids, finds the maximum of them, and counts its…
A: #include <iostream> using namespace std; int main(){ int…
Q: Write a program that compares the area of two rectangles. You can do this several ways, one way is…
A: The program is written in Python. Please find the program in step 2.
Q: Write a program that allows you to play rock,paper, scissors against the computer. When first run…
A: #include <iostream>#include <stdio.h>#include <stdlib.h>#include <ctime>…
Q: Write a program that creates a login name for a user, given the user's first name, last name, and a…
A:
Q: Write a program that takes a date as input and outputs the date's season. The input is a string to…
A: Below is the code in C++ as language not mentioned and sample output:
Q: Write a Java program that: Ask user to enter the last two digits of the Student ID number and store…
A: Program code: import java.util.*; class Main { public static void main(String ...args) { //…
Q: Write a Python program that will ask the user to input a word, will return the first letter of the…
A: Given: Write a Python program that will ask the user to input a word, will return the first letter…
Q: Write a program that transforms the user input stream: (1st) A B C A B C A B C (last) into the…
A: Here our task is to transform user input to the given format. User input will be a string, if we are…
Q: Write a program that will read a number and will display the factors of the number. Factors are…
A: Program code: x=int(input("Enter a number: "))print("The factors of",x,"are:")for i in range(1, x +…
Q: Write a Python program stored in a file q1.py that calculates what day of the week a certain date…
A: PROGRAM EXPLANATION: - Two string[]s are declared and initialized with string values. full_days…
Q: Write a program that takes in an integer in the range 11-100 as input. The output is a countdown…
A: Program Explanation: Import the class for scanner Define a class for countdown Declare and define…
Write a program that reads in from a file a starting month name, an
ending month name, and then the monthly rainfall for each month
during that period. As it does this, it should sum the rainfall amounts
and then report the total rainfall and average rainfall for the period.
For example, the output might look like this:
During the months of March–June, the total rainfall was 7.32 inches
and the average monthly rainfall was 1.83 inches.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Write a program using the random number generator to create a list of random rainfall measurements and save these numbers in a text file. Your program should handle any number of entries as long as you must have more than 12 readings to cover more than 1 year of measurements. You may assume that we do not have more than 5 inches of rain in a month.Write a program that asks users when their birthday is. Use information provided to give them their astrological sign. Each of the twelve signs should display a different horoscope. Use the following dates for each sign, keeping in mind that both month and day must be evaluated for an accurate result. Aries: March 21–April 20 Taurus: April 21–May 21 Gemini: May 22–June 21 Cancer: June 22–July 22 Leo: July 23–August 22 Virgo: August 23–September 23 Libra: September 24–October 23 Scorpio: October 24–November 22 Sagittarius: November 23–December 21 Capricorn: December 22–January 20 Aquarius: January 21–February 19 Pisces: February 20–March 20Write a program to process a collection of daily high temperatures. It will take 24 temperature values for one day. These values will be taken from user and will be in centigrade. Your program should count and print the number of hot days (high temperature 85 or higher), the number of pleasant days (high temperature 60–84), and the number of cold days (high temperatures less than 60). It should also display the category of each temperature and calculate the average temperature of the day and print it on the screen. Draw the flowchart of program.
- write a program that displays, in ascending order,the first names of those students who have attended more than one day of the course.If there are students with the same first name, display their first and last names.write a program in python Write a program that will allow a student to enter their name and then ask them to solve 10 mathematical equations. The program should display two random numbers that are to be added, such as: 247 + 129 The program should allow the student to enter the answer. The program should then display whether their answer was right or wrong, and accumulate the right values. After the 10 questions are asked, calculate the average that was correct. Then display the student name, the number correct, and the average correct in both decimal and percentage format. In addition to any system functions you may use, you might consider the following functions: A function that allows the student to enter their name. A function that gets two random numbers, anywhere from 1 to 500. A function that displays the equation and asks the user to enter their answer. A function that checks to see if the answer is correct and accumulates the number correct. A function that calculates the…The Research team led by Bernadette Wolowitz at Cal-tech University has discovered a new Amoeba that grows in the order of a Fibonacci series every month. They are exhibiting this amoeba in a national. conference. They want to know the size of the amoeba at a particular time instant. If a particular month's index is given, write a program to display the amoeba's size. For Example, the size of the amoeba on month 1, 2, 3, 4, 5, 6,... will be 0, 1, 1, 2, 3, 5, 8.... respectively.
- Python For this lab, you will use a tuple to represent a student record. A student record consists of the student’s name, year, and GPA. For example, (“John”, “Senior”, 3.7) is a record for John who is a senior with a 3.7 GPA. You will write a program that prompts the user for the number of records to enter. Then it reads input from the user for each record. Remember that each record consists of a student’s name, year, and GPA. It then prints the record of each student as shown below. Functions: You will write the following functions: read_records(n) Read n number of records and return a list of records. print_records(records) Takes in a list of records and print each one. main() Prompts the user for the number of records to read, get a list of records from the user, and print the records. Optional: print the average GPA of the students. Sample run: How many students record to enter: 2 Enter student's name: John Enter student's year: junior Enter…In python The text file “studentMarks.txt” has been provided for you. Each line contains the Last Name, First Name and 8 marks separated by spaces of a single student. For each student in the file, adjust the file to include the average of their top 6 marks, rounded to 1 decimal place, at the end of the line. For example, in the file, the line may say: Mars, Bruno 82 82 85 94 65 79 81 90 Afterwards, it should be updated to say: Mars, Bruno 82 82 85 94 65 79 81 90 Top6Avg: 85.7 Your program must define a function to determine the average of the top 6 marks. You may define more functions as needed for your program.Imagine we are working for a company that receives very high payouts. To help seehow is the situation then we want to write a program in Python. The program should read in the income for each month,there can be multiple payments each month and the numbers are separated by a space. The programshould continue reading in payments until the user writes quit. Then the program should be printedtotal payments for each month.If total payments are increasing, i.e. no month has a lower payment than the month onbefore, the program should also print out: "The income is growing."Examples:Payments: 200 300Payments: 320Payments: 100 80 80Payments: 400Payments: quit500320260400 -------------------------------Payments: 50 20Payments: 50 20 10Payments: 40 30 20 10Payments: 500Payments: 60 500Payments: quit7080100500560The income is growing.Payments: 10Payments: 10Payments: 11Payments: 12Payments: quit10101112 -----------------------The income is growing.Payments: 10 10 10Payments: 20 20 20Payments: 10…
- Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient the following data should be entered: • The number of days spent in the hospital• The daily rate• Charges for hospital services (lab tests, etc.)• Hospital medication charges.If the patient was an out-patient the following data should be entered:• Charges for hospital services (lab tests, etc.)• Hospital medication charges.Use a single, separate function to validate that no input is less than zero. If it is, it should be re-entered before being returned.Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out- patient data. Both functions should return the total charges.P020 0432 24 aia Hurester nakede er lo Input: 0020 10 70 44 0 025 60 432 0 100 forest 80 24 marsh Output: Forester walked for 103.889 hours Forester walked for 121,376 hour Mountaineer walked for 192.143 hours Mountaineer walked for 59.1405 hours Unit is at 0, 100 Unit is at 0, 100 Unit is at 80, 24 Unit is at 80, 24 Input: 10 7044 604 32 80 24 mountain Output : Forester walked for 809175 hours Mountaineer walked for 15.1523 hours Unit is at 80, 24 Unit is at 80, 24Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Ex: When the input is: 15 20 0 5 -1 the output is: 10 20 You can assume that at least one non-negative integer is input.