Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

In python, explanations help. 3. Write a function printPositive() that takes a string representing the name of a text file as a parameter. The function

In python, explanations help.image text in transcribed

3. Write a function printPositive() that takes a string representing the name of a text file as a parameter. The function reads the numbers found in the file and prints the values that are positive >0) to the screen, one per line. You may assume that the file specified as a parameter exists and that it contains zero or more numbers. There may be more than one number per line. The following shows what the function would return when called on several sample files found in the zip file containing the assignment template. Do not forget to close the file file://Users/bmaya/Documents/DePaul_Teaching/17-18_WQ/csc241W2017Hws/assign4 html 2/4 1/24/2018 Assignment 4-CSC 241-801 Python 3.6.2 Shell File Edit Shell Debug Options Window Help >>printPositive('nums1.txt') 12 17.99 85.3 50 >>> printPositive('nums2.txt') 10 15 18.99 3.95 >> printPositive('empty.txt') Ln: 63 Col: 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students explore these related Databases questions

Question

Define organisational structure

Answered: 3 weeks ago

Question

Define line and staff authority

Answered: 3 weeks ago

Question

Define the process of communication

Answered: 3 weeks ago