#Global two dimensional list l1=[] #To read the data and stores it in two dimensional list def getdata(): global l1 #to access the global list l1 # Taking input of high and low temperature for 12 months(year) for i in range(12): l=[] high=int(input("Enter high temperature:")) low=int(input("Enter low temperature:")) l.append(high) l.append(low) l1.append(l) #To calculate average high temperature during the whole year def averageHigh(): s=0 for i in range(12): s=s+l1[i][0] return s/12 #To calculate average Low temperature during the whole year def averageLow(): s=0 for i in range(12): s=s+l1[i][1] return s/12 #To calculate the index of the month having highest temperature #Index 0 means 1st month and index 11 means 12th that means last month def indexHighTemp(): max=l1[0][0] for i in range(1,12): if(l1[i][0]>max): max=l1[i][0] j=i return j #To calculate the index of the month having lowest temperature def indexLowTemp(): min=l1[0][1] for i in range(1,12): if(l1[i][1]
Homework assignment 2 (PDF).pdfwrite it in python
Please help with this python assignment. Thank you. question 1 Write a Python program to read a file line by line store it into a variable. question 2 Write a Python program to read a file line by line store it into an array. question 3 Write a python program to find the longest words. question 4 Write a Python program to count the number of lines in a text file. question 5 Write a Python program to count the...
Write a Python program to convert a pdf file to html page. Write Code in Python Language Only. Please Send Screenshots also Good Answer is Appreciable...
Python Assignment: Write a program that uses stacks to solve postfix equations.Read the below in a strings, character by character, into a stack and solve them. 3 2 + 4 * 5 1 - /
Please write in Python language.
Assignment 5 0 Write a program that reads in integers and then determines whether input value is prime number or not(using for statement) • First input Input number: 18457 yes . Second input Input number: 52 no
1) Translate the following equation into a Python assignment statement 2) Write Python code that prints PLUS, MINUS, O ZERO, depending on the value stored in a variable named N. 3) What is printed by: 3 - 1 while 5: while 10 Print ) Page 1 of 9 4) Write a Python while loop that reads in integers until the user enters a negative number, then prints the sum of the numbers. 1-2 of 9 4) Write a Python while...
This assignment should be written in PYTHON programming language Please write python programs to answer the following questions. Everything should be dynamically scraped from the live websites using the Beautiful Soup interface. Texas Dept of Criminal Justice (relevant url: http://www.tdcj.state.tx.us/death_row/dr_executions_by_year.html): Accept two integers as input. You can assume that these values represent a valid starting and ending year within the range of the years in the table. Process the html and find the total number of executions in Texas between...
PYTHON PROGRAM QUESTION
Python programming
PYTHON PROGRAMMING
ASSIGNMENT
PYTHON PYTHON PYTHON P Y T HO N
I'm having trouble with the following Python homework assignment question in ZyBooks: 2.14 HW: Driving costs Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Ex: If the input is: 20.0 3.1599 Then the output is: 1.579950 7.899750 63.198000 Any assistance is greatly appreciated. Thanks!
For this interactive assignment, you will continue to utilize loops and functions and write a Python program that asks the user for an integer (number) greater than 1. Once the user enters an integer, it should then allow the user to CHOOSE between the following two options: If 1 is entered, a countdown from that number to zero is printed. If 2 is entered, the factorial of the number is printed. If the user inputs a number less than 1,...