Answer:
import java.util.Scanner;
public class TestClock {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int sum = 0;
char op;
do{
System.out.println("Enter two numbers");
int num1= in.nextInt();
int num2 = in.nextInt();
sum = sum+num1+num2;
System.out.println("Do you wish to perform another operation, Y/N");
op =in.next().charAt(0);
}while(op =='Y'||op=='y');
System.out.println("sum "+sum);
}
}
Explanation:
The code is implemented in Java progrmming language
- create an integer variable sum
- create a character variable op
- create a do while loop to request user to enter num1 and num2
- Request the user to also enter a char Y/N (yes or no repectively)
- While the char is Y keep adding up the sum and prompt the user to enter two new numbers
- Else break out of the loop and print the sum
Answer:
D
Explanation:
Thunderbolt is a universal connection mainly found on apple computers that consolidates the transfer of power, data and video into a single connector.
Twisted copper telephone wire, coaxial copper cable, fiber-optical cable, and media for wireless transmission are all physical transmission medium.
A system or material that can mediate the propagation of signals for telecommunications purposes is referred to as a transmission medium. Typically, signals are applied to a wave of some sort that is appropriate for the selected medium.
For instance, data may modulate sound, and while air is a common transmission channel for sounds, solids and liquids can also be used. A useful transmission medium for electromagnetic waves like light and radio waves is vacuum or air.
Although a physical substance is not necessary for the propagation of electromagnetic waves, these waves are typically impacted by the transmission medium they pass through, for example, by absorption, reflection, or refraction at the interfaces between media. Therefore, waves can be transmitted or guided using technical devices.
To know more about transmission medium click here:
brainly.com/question/28113920
#SPJ4
Answer:
Software is a collection of instructions that tell a computer how to work. This is in contrast to hardware, from which the system is built and actually performs the work.
Answer:
The solution code is written in Python 3.
- def convertDate(date_string):
-
- date_list = date_string.split("/")
-
- for i in range(0, len(date_list)):
- date_list[i] = int(date_list[i])
-
- return date_list
-
-
- print(convertDate('06/11/1930'))
Explanation:
Firstly, create a function convertDate() with one parameter, <em>date_string</em>. (Line 1).
Next, use the Python string <em>split()</em> method to split the date string into a list of date components (month, day & year) and assign it to variable <em>date_list</em>. (Line 3) In this case, we use "/" as the separator.
However, all the separated date components in the <em>date_list</em> are still a string. We can use for-loop to traverse through each of the element within the list and convert each of them to integer using Python<em> int() </em>function. (Line 5 - 6)
At last return the final date_list as the output (Line 8)
We can test our function as in Line 11. We shall see the output is as follow:
[6, 11, 1930]