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
Furkat [3]
4 years ago
11

Write a function named get_my_age that returns your age as an int (this is YOUR age, so if you were 21 you would return the numb

er 21). Note that this function takes no arguments and no input from the user. Call the function once and print the result. Reflect on the difference between creating a variable with a constant value and creating a function with no arguments that returns a constant return value.
Computers and Technology
1 answer:
d1i1m1o1n [39]4 years ago
5 0

Answer:

<em>The programming language is not stated; However, I'll answer this question using 2 programming languages (Python and C++)</em>

<em></em>

<em>Comments are used for explanatory purpose </em>

Python program starts here

def get_my_age():  #Declare function

      age = 21  #Assign value to age

      print(age)  #Print age

get_my_age() #Call function

#End of Program

C++ Programming Language starts here

#include<iostream>

using namespace std;

int get_my_age() //Declare Function

{

int age = 21; //Assign value to age

cout<<age; //Print age

}

int main()

{

get_my_age(); //Call Function

return 0;

}

You might be interested in
Which fingers do you use to type the following letters rtgvf
Allushta [10]
Middle,index,index,thumb,middle
3 0
3 years ago
Kayla is working on a document for her business meeting. She wants to save this document with another name. Which option should
Fittoniya [83]
Kayla could use “save as” to rename the document.
5 0
3 years ago
What do customers use to access the internet, usually for a monthly fee?
kati45 [8]
To search things like answers,order things on Amazon,or go watch videos on Youtube
4 0
3 years ago
A strategy to solve a logic problem is to break it into steps. Using the drop-down menu, complete these sentences about solving
PSYCHO15rus [73]
I think the answer is 3!!
3 0
3 years ago
Read 2 more answers
Tricia listed her assets and liabilities. Credit Card Bill Car Loan Bonds Piano Bank Account Bicycle Which are Tricia’s liabilit
DIA [1.3K]
<span>Her liabilities are her credit card bill and her car loan. These are things that she owes and has to pay off, so they are liabilities due to the fact that she owes for these items. Her bonds, piano, bank account, and bicycle are counted as assets.</span>
7 0
3 years ago
Read 2 more answers
Other questions:
  • What is a fragment shader? Question 5 (3 marks) What is trilinear filtering?
    8·1 answer
  • If you want to access your files anywhere from almost any connected device, you should store your files on your ________.
    9·1 answer
  • In the Microsoft publisher application, words underlined in red are ____.
    6·1 answer
  • The Mohs scale is used to express which mineral property?
    15·1 answer
  • 1. What are the benefits and drawbacks of keeping separate journals for individual accounts?​
    8·1 answer
  • 19. Fair use applies to which of the following situations?
    14·1 answer
  • Inputting a range of numbers comprising a batch and then inputting each serially numbered document is characteristic of the cont
    11·1 answer
  • Menus are attached to the windows by calling
    15·1 answer
  • 111+ 11- 1 <br><br><br>1111+1111<br><br><br><br><br>1101 +1101<br><br><br>1010-11​
    10·2 answers
  • PLEASE HELP WITH KHAN ACADEMY WILL GIVE BRAINLIEST!!!!!!!!!!!!!!!!!!!!!!!!
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!