Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Code for square root in visual basic 2010

13/11/2021 Client: muhammad11 Deadline: 2 Day

PT1420: Functions in Pseudocode and Visual Basic

Writing Your Own Function that Returns an Integer

Step 1: A function contains three parts: a header, a body, and a return statement. The first is a function header that specifies the data type of the value that is to be returned, the name of the function, and any parameter variables used by the function to accept arguments. The body is composed of one or more statements that are executed when the function is called. In the following space, complete the following: (Reference: Chapter 6, Writing Your Own Functions, page 225 of your textbook, Starting Out with Programming Logic & Design).

1. Write a function with the header named addTen.

1. The function will accept an Integer variable named number.

1. The function body will ask the user to enter a number and the add 10 to the number. The answer will be stored in the variable number.

1. The return statement will return the value of number.

Function a.__________ a.____________ (b.______________)

Display “Enter a number:”

Input c._________________

Set c._____________ = number + 10

Return d.___________________

Step 2: In the following space, write a function call to your function from Step 1.

Set number = ____________________ (__________________)

Step 3: Launch and create a new workspace in Visual Basic. Place the following code inside and run the program. Notice there is already a call to addTen(number) and that the function call operates the same ways a module call does, except that a function call accepts a returned value. Therefore, the function call looks as number = addTen(number).

Module Module1

Sub Main()

Dim number As Integer = 0

number = addTen(number)

Console.WriteLine("The number with 10 added to it is : " & number)

Console.WriteLine("Press any key to continue...")

Console.ReadLine()

End Sub

End Module

Your module looks like this:

Description: C:\Users\Soumya\Documents\Nishma\NIIT\ITT\OLV\PT1420\DD\Attachments_2012_03_11_1\first.PNG

Step 4: After End Sub in Main(), add a function by typing the following:

Function addTen(ByVal number As Integer)

When you hit enter, the End Function will automatically be added. All code in the function will be between Function and End Function.

Step 5: Write a line of code that will allow the user to enter a number and then add the formula number = number + 10 based on the pseudocode in step 1 of this lab.

Step 6: Before End Function, add a return statement that looks like:

Return number

Now, your module looks like this:

Description: C:\Users\Soumya\Documents\Nishma\NIIT\ITT\OLV\PT1420\DD\Attachments_2012_03_11_1\three.PNG

Step 7: Run your program so that if works properly. Your output might look as follow:

Using Mathematical Library Function: sqrt

Step 8: The sqrt function accepts an argument and returns the square root of the argument. In the following space, complete the following: (Reference: The sqrt Function, page 240 of your textbook, Starting Out with Programming Logic & Design).

1. Declare a variable named myNumber and a variable named squareRoot of the data type Real.

1. Ask the user to enter a number of which they want to find the square root. Store the input in myNumber.

1. Call the sqrt function to determine the square root of myNumber.

1. Display the square root to the screen.

Declare Real a.___________________

Declare Real a.______________________

Display “Enter a number:”

Input b._________________________

Set c.______________ = _______________________

Display “The square root is”, d.____________________

Step 9: Using the same Visual Basic workspace, under the output from your previous lab, declare and initialize myNumber and squareRoot as doubles set equal to 0.

Step 10: Write a line of code that will allow the user to enter in a value for myNumber.

Step 11: Next, add the following line of code which calls the System.Math.Sqrt() function:

squareRoot = System.Math.Sqrt(myNumber)

Also note the many other Math functions available for use.

Step 12: Add a line of code that will display the value of squareRoot.

Step 13: Run your program so that if works properly. Your output might look as follow:

Step 14: Submit the Visual Basic code as a compressed (zipped) folder using the following steps:

1. Open Windows Explorer --> Start --> All Programs --> Accessories --> Windows Explorer. Your Windows Explorer might look as follows:

Description: Description: Description: C:\Users\Soumya\Documents\Nishma\NIIT\ITT\OLV\PT1420\DD\Attachments_2012_03_9\windows_explorer.png

1. In Windows Explorer, navigate to the folder that contains your project files. Your Windows Explorer might look as follows:

Description: Description: Description: C:\Users\Soumya\Documents\Nishma\NIIT\ITT\OLV\PT1420\DD\Attachments_2012_03_9\folder_with_projects.PNG

(If you don't recall you can check in Visual Studio by opening your project, right click module1.vb file and view the properties. Look at the full path ex. C:\Users\instructor\Documents\Visual Studio 2010\Projects\myFirstProgram\myFirstProgram\Module1.vb; in this case navigate to C:\Users\instructor\Documents\Visual Studio 2010\Projects). Your module properties might look as follows:

Description: Description: Description: C:\Users\Soumya\Documents\Nishma\NIIT\ITT\OLV\PT1420\DD\Attachments_2012_03_9\file_path_visual_studio.PNG

1. Right click on your project folder and choose send to --> compressed folder. This creates a zip file of all your code. Your Windows Explorer might look as follows:

Description: Description: Description: C:\Users\Soumya\Documents\Nishma\NIIT\ITT\OLV\PT1420\DD\Attachments_2012_03_9\compressed_file.png

1. Attach the compressed folder you created to your submission. Your Windows Explorer might look as follows:

Description: Description: Description: C:\Users\Soumya\Documents\Nishma\NIIT\ITT\OLV\PT1420\DD\Attachments_2012_03_9\compressed_file_to_submit.PNG

Page 1

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Supreme Essay Writer
Helping Hand
Chartered Accountant
Innovative Writer
Phd Writer
High Quality Assignments
Writer Writer Name Offer Chat
Supreme Essay Writer

ONLINE

Supreme Essay Writer

I have done dissertations, thesis, reports related to these topics, and I cover all the CHAPTERS accordingly and provide proper updates on the project.

$45 Chat With Writer
Helping Hand

ONLINE

Helping Hand

I can assist you in plagiarism free writing as I have already done several related projects of writing. I have a master qualification with 5 years’ experience in; Essay Writing, Case Study Writing, Report Writing.

$48 Chat With Writer
Chartered Accountant

ONLINE

Chartered Accountant

I am an elite class writer with more than 6 years of experience as an academic writer. I will provide you the 100 percent original and plagiarism-free content.

$17 Chat With Writer
Innovative Writer

ONLINE

Innovative Writer

After reading your project details, I feel myself as the best option for you to fulfill this project with 100 percent perfection.

$40 Chat With Writer
Phd Writer

ONLINE

Phd Writer

This project is my strength and I can fulfill your requirements properly within your given deadline. I always give plagiarism-free work to my clients at very competitive prices.

$20 Chat With Writer
High Quality Assignments

ONLINE

High Quality Assignments

I am an experienced researcher here with master education. After reading your posting, I feel, you need an expert research writer to complete your project.Thank You

$15 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Trends and issues in instructional design and technology 2nd edition - Techniques in act 1 scene 5 macbeth - Lewis structure and molecular models lab answers - Cold junction compensation ic - Can a solution of lead ii nitrate oxidize copper - How to reference aasb harvard - Half bridge strain gauge wiring - Southwest airlines pestel analysis - Assignment - Voltmeter galvanic cell - Liver cake for dogs - Among us free skin download - Hypothetical process time function map for nissan - See think wonder template - C489 task 3 - Disadvantages of irrigation scheduling - Decimal reduction time calculation - Layers of a trilaminar embryo - Answer the following question in 600 to 700 words - Clothing boutique case study - Risk management case study with solution - 8-1 Discussion: Technical Communications and the World Wide Web - Network Security - Assignment: Practicum: Cover Letter, Resume, and Portfolio (Due in Week 10) - Writing assignment 6 - 247 vincent st san antonio tx 78211 - Jana wendt eye disease - Kaplan financial discount code - Mandevilla alice dupont plant - Mitsubishi air conditioner acl button - Change the style of the selected sparkline to sparkline style accent 2 darker 25 - Broderick & blewitt the lifespan 2015 - Cornell Notes Assignments - due in 16 hours - Module 4 Writing assignment - Denver airport case study project management - Environmental systems extended essay samples - Diels alder reaction lab report discussion - Develop a resource schedule in the loading chart - Commonwealth bank eftpos machine error codes - Gsm services in mobile computing - 2 truths and a lie instructions - Monroe's motivated sequence speech outline - Mitosis under the microscope worksheet answers - Computer games san francisco - Land registry transaction form victoria - Discussion - Braemar wf2000 cuts out - Steel Company - Oberon tarana heritage railway - Week 7 Final Paper - Critique on nutrition and pregnancy - A master electrician's license is most likely to be held by - The company's adjusted trial balance as follows - The hobbit the desolation of smaug google docs - Tm v state of florida summary - Ms project resource pool problems - Management information system.For this project, use the following hypothetical situation - Mass communication living in a media world sixth edition pdf - Holy cow canvas push pin map - Vedic maths division by nikhilam method - Brush transformers gulf llc - Lanley homes great eccleston - Downey sda church children's story - Week 4 Discussion Negotiation and Conflict Management - Business services training package assessment guidelines - Kernel data structure in os - Myers briggs field marshal - Student life centre sussex - 20.3 problem solving with constraints answer key - How does an illiterate oil rich sheik sign his name - Factorytalk alarms and events not working - Diploma of engineering uts - Prospect and belleview bieck apartments - Joyce mayne warehouse kawana - Cbus super site login - Netflix push and pushback in streaming video - Bransford and johnson 1972 summary - Strategies for effective interpersonal communication - Gibbs reflective cycle example - Is sam's club a wholesaler or retailer - Who called atticus a negro lover - Qbcc license check qld - Solatube 160 ds installation instructions - Types of urban processes - Postulates of special theory of relativity ppt - Run lola run jump cuts - Northern virginia community college registrar - 200 kva transformer oil capacity - Another short question - Media of mass communication john vivian pdf - Portrait head of queen tiye - Need help on 5 discussion QC - Pre employment checks nsw health - If a simple pearson correlation value = .512, what percentage of variance is accounted for? - How to write a treatment plan social work - Mister jones side effects - 11/20 in simplest form - If the activity level increases 10 total variable costs will - Siemens v20 factory reset - Warwick english literature modules