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
Help with this robotics hw pls
enyata [817]
Hard to see, if you make it normal size I might b able to help
8 0
3 years ago
An undesirable jagged appearance is referred to as
Papessa [141]

What do we have to answer spectificly

7 0
3 years ago
Read 2 more answers
When an object is selected, it is surrounded by ________, which allow you to change the size of the object.?
boyakko [2]
Matter. because matter surrounds us all and helps us move and change. 
6 0
3 years ago
How to Save Power-Point presentation as a single file Web page that can be uploaded to the World Wide Web ?
Fittoniya [83]
Google docs and save it there. hope this helps. thanks
3 0
3 years ago
Write a shell (text-based) program, called sum_second.py, that opens a text file called stuff.txt with 2 numbers per line separa
Ivanshal [37]

Answer:

See explaination for the program code

Explanation:

The Programming code:

inFile = open("stuff.txt", "r")

num = []

Sum = 0

for val in inFile.readlines():

value = val.split(",")

Sum = Sum + int(value[1])

print("Sum of second number on every line in the file is: ", Sum)

inFile.close()

Please kindly check attachment for output

6 0
3 years ago
Other questions:
  • Which network topology requires terminators at the ends of the backbone cable?
    6·1 answer
  • Describe how you center text.
    7·2 answers
  • What is a Better Computer?<br> A. Alien<br> B. Microsoft<br> C. Windows<br> D. Apple
    11·2 answers
  • A) Write 600 as the product of prime factors.<br> Give your answer in index form.
    7·2 answers
  • Which type of computer graphic can be blown up to a much larger size without getting distorted or losing quality?
    5·1 answer
  • What is the mass of a cookbook
    7·1 answer
  • Rafi is developing an application to send urgent information about global health crises over the Internet to hospitals. He is wo
    6·1 answer
  • You have a passage of text that needs to be typed out, but some of the letter keys on your keyboard are broken! You're given an
    14·1 answer
  • What do you mean by Graphics editing​
    14·1 answer
  • Question 12 (5 points)
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!