Functional Programming DAT 210 Top of Form Assignment
in Other (Other) by vomms
Favorite
Add it to your favorites and revisit later
Instant Download
Previewing 1 of 6 total pages.
Regular Price: $12.86
Your Price: $9.00 (30% discount)
You Save: $3.86
Your Price: $9.00 (30% discount)
You Save: $3.86
Description
Functional Programming DAT 210 Top of Form
Assignment Content Top of Form Writea 2-part program using Ruby, Java, or Python.
Part 1 Write a function to gather the following costs from the user: Travel cost: 9,800 Hotel cost: 3,500 Rental car cost: 1,600 Labor cost: 15,500
Code: def getInput(st): """ Function that reads the input from user """ try:
Reading costs from user
cost float(input("Enter " st " : "))
Checking for negative amount
if cost 0: print("\n Please enter positive amounts only. ") getInput(st)
Returning cost
return cost
except:
Printing error...
Comments (0)
You must sign in to make a comment.
Rating:
Published On:
09/27/2020
Last Updated:
09/27/2020
Print Length:
6 page(s)
Word Count:
422
File Name:
dat210-wk5---functional-programmingdocx-38.docx
File Size:
108.53 KB (0.11 MB)
Sold By:
vomms
Purchased:
0 times
Best Seller Ranking:
#