1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
I am Lyosha [343]
3 years ago
13

Write a program that will read two floating point numbers (the first read into a variable called first and the second read into

a variable called second) and then calls the function swap with the actual parameters first and second. The swap function having formal parameters number1 and number2 should swap the value of the two variables
Computers and Technology
1 answer:
Elenna [48]3 years ago
3 0

Answer:

In Python:

def swap(number1,number2):

   a = number1

   number1 = number2

   number2 = a

   return number1, number2

   

first = float(input("First Number: "))

second = float(input("Second Number: "))

print("After Swap: "+str(swap(first,second)))

Explanation:

The swap function begins here

def swap(number1,number2):

This saves number1 into variable a

   a = number1

This saves number2 into number1

   number1 = number2

This saves a (i.e. the previous number1) to number2

   number2 = a

This returns the numbers (after swap)

   return number1, number2

   

The main begins here

The next two lines prompt the user for first and second numbers

<em>first = float(input("First Number: "))</em>

<em>second = float(input("Second Number: "))</em>

This calls the swap function and print their values after swap

print("After Swap: "+str(swap(first,second)))

You might be interested in
What's the best way to use a lectern during your speech?
valentina_108 [34]

<span>Make eye contact look at everyone ur speaking to not just one person speak loud and clearly make sure your understandable</span>
6 0
3 years ago
Read 2 more answers
The _____ feature will allow users to view nonprinting formatting marks to aid in editing a document. View Alignment Show/Hide I
Annette [7]

The __Show/Hide Insert___ feature will allow users to view non printing formatting marks to aid in editing a document.

The answer is D. Show/Hide Insert

Let me know if this is correct

5 0
3 years ago
The set of Visual Basic instructions that tells an object how to behave after an action by the user (such as clicking a button)
alexdok [17]

Answer:

Event procedure

Explanation:

Whenever a user perform certain action, such as press a button on the keyboard or click the mouse, etc. such action are called an event. when an event occurs, Visual Basic looks for BASIC instructions to tell the object in the program how to behave to the user event. The Visual Basic instructions that responds to this specific event is called an event procedure.

7 0
3 years ago
Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
OlgaM077 [116]

Answer:

i only have a little that i know sorry,Hope you make this brainly that would make my day

Explanation:

you look for TRUE facts

Things that MAKES sence

Things that are ONLY what you are research.

Thats all that i Know

3 0
3 years ago
Read 2 more answers
(Microsoft Word) Tab stops are very useful when you want to..
Leviafan [203]
B. Align text into columns 
8 0
3 years ago
Read 2 more answers
Other questions:
  • Create a query that will list all technician names, employee numbers, and year hired in order by year hired (Newest to Oldest).
    5·1 answer
  • Which property of a text element controls how the browser handles text that does not fit within the element box?
    13·1 answer
  • Why does my inbox keep getting notifications and then disappearing?
    15·2 answers
  • What can provides access to the only menu in office 2007​
    13·1 answer
  • What are the benefits of writing functions that use parameters and return? Try to list at least two.
    12·1 answer
  • You want to add a new Product and Services entry to your client's QuickBooks Online company. The service is installation of a se
    12·1 answer
  • Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the cou
    8·1 answer
  • When preparing a technical document, do all of the following EXCEPT:_______.
    12·1 answer
  • A ________ is a device used to illegally capture the data stored on the magnetic stripe of an ATM card, credit card, or debit ca
    10·1 answer
  • When the user types into a Textbox control, the text is stored in the control's __________ property.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!