Preview

Pt1420 Unit 6 Programming

Satisfactory Essays
Open Document
Open Document
420 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Pt1420 Unit 6 Programming
John Bareswilt
Pt1420
Unit 6
Page 1
5.def mix colors ( primary1 , primary2 ) : i f primary1 == primary2 : return primary1 e l i f primary1 == ”red” and primary2 == ”blue” or primary1 ==
”blue” and primary2 == ”red ”: return ”purple” e l i f primary1 == ”red” and primary2 == ”yellow” or primary1
== ”yellow” and primary2 == ”red ”: return ”orange” e l i f primary1 == ”yellow” and primary2 == ”blue” or primary1
== ”blue” and primary2 == ”yellow ”: return ”green” global primary1 = input (” Please enter a primary color : ”) global primary2 = input (” Please enter another primary color : ”) i f global primary1 != ”red” and global primary1 != ”blue” and global primary1 != ”yellow” or global primary2 != ”red” and global primary2 != ”blue” and global primary2 != ”yellow ”: print (” These are not primary colors . I can ’ t mix them !”) else : secondary color = mix colors ( global primary1 , global primary2 ) print (”When you mix the primary colors , ” , global primary1 , ” and ” , global primary2 , ” , you get the secondary color ,
” , secondary color , ”.” , sep = ’ ’)
6. Public Class BookMain
Public Shared Sub Main
Dim numberOfBook As Integer = 5

Console.WriteLine("{0} Points", GetPointByPurchase(numberOfBook))
End Sub
End Class

Public Module Main
Public Function GetPointByPurchase(ByVal numberOfBook As Integer) As Integer
Select Case numberOfBook
Case 1
GetPointByPurchase = 5
Case 2
GetPointByPurchase = 15
Case 3
GetPointByPurchase = 30
Case >= 4
GetPointByPurchase = 60
Case Else
GetPointByPurchase = 0
End Select
End Function
End Module
7. Console.WriteLine("Enter the number of packages to be purchased.");

if (numberPurchased >= 10 && numberPurchased <= 19) {

discountPercentage = 20; }

else if (numberPurchased >= 20 && numberPurchased <= 49) {

discountPercentage = 30;

}

else if (numberPurchased >= 50 && numberPurchased <= 99) {

discountPercentage = 40;

}

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Finally, on day 150 we try an “all in” strategy spending $160.000 in 1 machine for station 1 and 2 to increase the capacity and to process jobs only on conditions of contract 3. This decision was taken based on a demand of 91 jobs and a utilization of station 1 of 0.83 between days 143 and…

    • 855 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Is3350 Unit 1 Assignment

    • 2098 Words
    • 9 Pages

    If a change in accounting policy is caused by the initial application of an international standard or…

    • 2098 Words
    • 9 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Nt1310 Unit 4

    • 775 Words
    • 4 Pages

    Part III PHYSICS HSE II Time:2Hours Max:60 Scores 1. Three identical charges each +q are placed at the corners of an equilateral triangle of side d cm. Calculate the force on a +ive charge +2q at the centroid of the triangle. 2 2.If the earth is supposed to be a metallic sphere,its capacity will be nearly (a) 700pf (b) 700 microfarad (c) 700f (d) 6.4 X10^6 f 1score 3. write the relation between dielectric constant and electric susceptibility. 1score 4. A box encloses an electric dipole consisting of charge 5micro C and -5micro C and of length 10cm. What is the total electric flux through the box? 2scores 5. Find the ratio of the p.d that must be applied across the (1)parallel (2) series combination of two identical capacitors so that the energy stored in the two cases becomes the same. 2 scores 6.(a)…

    • 775 Words
    • 4 Pages
    Satisfactory Essays
  • Better Essays

    Mt435 Unit 3 Assignment

    • 1483 Words
    • 6 Pages

    Russell, R. Taylor, B. (2011). Operations Management: Creating Value along the Supply Chain, 7th Edition. Hoboken, New Jersey: John Wiley and Sons…

    • 1483 Words
    • 6 Pages
    Better Essays
  • Good Essays

    Nt1310 Unit 5

    • 368 Words
    • 2 Pages

    the ratio of resistors on one side of the bridge is one while the ratio of resistors on the other side is infinity…

    • 368 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    MT445 Unit 4

    • 523 Words
    • 3 Pages

    Please answer the following questions. Submit as a Microsoft Word® document to the Dropbox when completed.…

    • 523 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    pt1420 unit 3

    • 395 Words
    • 2 Pages

    Unshielded Twisted-Pair- A cable with multiple pairs of twisted insulated copper conductors bound in a single sheath.…

    • 395 Words
    • 2 Pages
    Good Essays
  • Better Essays

    Mt435 Unit 6 Assignment

    • 1155 Words
    • 5 Pages

    (03) Getting the plant up to code needs to be a short term goal, as they could be shut down since they are not up to US safety and environmental standards. The company cannot afford a shut down or huge fines for not being in compliance. The EPA offers many services that can help the company to get in compliance and to help the company stay in compliance also and the company needs to seek their help to ensure they are meeting the standards.…

    • 1155 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    Pt1420 Unit 4

    • 4123 Words
    • 17 Pages

    A minimization problem with four decision variables, two greater-than-or-equal-to constraints, and one equality constraint will have…

    • 4123 Words
    • 17 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 2 NT1430

    • 377 Words
    • 2 Pages

    8. What is the result of giving the which utility the name of a command that resides in a…

    • 377 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pay attention to the suggested corrects details, because if you don’t you’ll not get it. I have no problem with the spelling of “Andrews”. Look at your post when you say address, you brought period(.) then (2014) immediately after Andrews, instead of comma (,). I don’t think is my job to be talking about this minute and infinitesimal detail.…

    • 64 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Nt1310 Unit 1 Module 2

    • 283 Words
    • 2 Pages

    On Thursday, December 22nd 2016, at approximately 10:00AM Mrs. Marie Ernst, HAAS Assistant Principal, informed me a HASD tablet computer, issued to Gilbert Reyes, Grade 10, was broken during period 1/2. She received information on Wednesday, December 21st, 2016 from Mr. Michael Shebolock, HAAS Physical Ed Teacher, regarding the broken tablet.…

    • 283 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Nt1310 Unit 4

    • 1039 Words
    • 5 Pages

    Users feel alert and in tune with their surroundings. Sound, colour and emotions seem more intense. Users may dance for extended periods. Effects may last for 3 to 6 hours.…

    • 1039 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Pt1420 Unit 6

    • 222 Words
    • 1 Page

    1. The society will consist of an agricultural branch, which will be responsible for gathering/growing food for the people. There will be a construction branch, which will be responsible for building houses, public buildings and other structure and repairing them if needed.…

    • 222 Words
    • 1 Page
    Satisfactory Essays
  • Powerful Essays

    4. Assume the variables result, w,x, y, and z are all integers, and that w= 5, x= 4, y=8 and z=2. What will the values be stored in result in each of the following statements?…

    • 748 Words
    • 3 Pages
    Powerful Essays

Related Topics