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]
3 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]3 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
In a student​ database, a row that describes the top​ student, including his or her​ LastName, FirstName, and​ StudentNumber, is
STatiana [176]

Answer:

Record

Explanation:

4 0
3 years ago
LAB: Winning team (classes)
andrey2020 [161]

Answer:

The function is as follows:

def get_win_percentage(self):

       return self.team_wins / (self.team_wins + self.team_losses)

Explanation:

This defines the function

def get_win_percentage(self):

This calculates the win percentage and returns it to main

       return self.team_wins / (self.team_wins + self.team_losses)

<em>See attachment for complete (and modified) program.</em>

Download txt
6 0
3 years ago
Integrated circuits are made up of _____ that carry the electrical current.
brilliants [131]
Silicon.  Hope it helped.



~ThePirc
5 0
3 years ago
Which kind of device does a computer need in order to provide information to a person or something else?
Keith_Richards [23]
<span>Which kind of device does a computer need in order to provide information to a person or something else?
The answer is
B. output device
</span>
3 0
3 years ago
Trevor is working with his data records for paydays. Some of the dates were left blank because of holidays. To find these record
ch4aika [34]

Answer:

Either leave it blank or type zero

Explanation:

8 0
3 years ago
Other questions:
  • What is the importance of using the proper markup language?
    8·2 answers
  • What is the most efficient way to include a space after each paragraph?
    13·2 answers
  • A commonly used font style is _____. superscript periwinkle times new roman point
    7·1 answer
  • Which tool lists active tcp connections?
    8·1 answer
  • Is “Annabelle” a true story? I mean it is fiction right?
    5·2 answers
  • A window may be resized by dragging the___ or side of it
    14·2 answers
  • How to code on python
    8·2 answers
  • Cuales son las funcione basica de la computadora​
    9·1 answer
  • Describe how being a global citizen in the world of advanced technology can be beneficial to your success in meeting your person
    13·1 answer
  • Top/Bottom Rules allow a user to apply conditional formatting to cells that fall within the top or bottom numbers or percentile.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!