Answer:
Following are the program in Python langauge
person_name = input() # Read the person name by the user
person_age=0 #declared a vaiable person_age
person_age = int(input()) # read person_age by the user
person_age=person_age+5 # add 5 to person_age
print('In 5 years',person_name,'will be',person_age) # display the output
Output:
Amy
4
In 5 years Amy will be 9
Explanation :
Following is the description of code:
- Read the value of the "person_name" variable by the user by using the input function.
- Declared a variable person_age and initialized 0 with them.
- Read the value of "person_age" variable by user by using input function and convert into int by using int function
- Add 5 to "person_age" variable and store again them into the "person_age" variable.
- Finally, display the output which is mention in the question.
Answer:
D) Static method
Explanation:
A static method is a method that is created only for the class and not it's instance variables or objects. Such methods can only be accessed by calling them through the class's name because they are not available to any class instance. A static method is created by prefixing the method's name with the keyword static.
A static method cannot be overridden or changed. You create a static method for a block of code that is not dependent on instance creation and that can easily be shared by all instances or objects.
Answer: The radio should be tuned to 100. 0 Mhz.
Explanation:
As radio waves are electromagnetic waves, like x-rays, UV rays, and all the wavelengths of visible light, they propagate in the free space at the speed of light: 3. 10⁸ m/s.
At any wave, there is a fixed relationship between the distance travelled by the wave along one cycle (which is called wavelength ) and the speed at which the wave oscillates (which is called the frequency of the wave), with the speed at which the wave propagates, as follows:
λ (wavelength) = v (speed) / f (frequency)
Replacing by the values, and solving for frequency, we have:
f = 3. 10⁸ m/seg / 3 m = 10⁸ 1/sec = 10⁸ Hz = 100. 0 Mhz
This is the radio channel to which must be tuned in order to listen the station with a wavelength of 3 m, in the FM band.
Answer:
In C programming you can only pass variables as parameter to function.
Explanation: