Answer:
- using System;
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("Enter number of students: ");
- int num = Convert.ToInt32(Console.ReadLine());
- string [] firstName = new string[num];
- string [] lastName = new string[num];
-
- for(int i=0 ; i < num; i++){
- Console.WriteLine("Enter first name: ");
- firstName[i] = Console.ReadLine();
-
- Console.WriteLine("Enter last name: ");
- lastName[i] = Console.ReadLine();
- }
-
- for(int j=0; j < num; j++){
- Console.WriteLine(lastName[j] + "," + firstName[j]);
- }
- }
- }
Explanation:
Firstly, prompt user to enter number of student to be stored (Line 6- 7). Next, create two array, firstName and lastName with num size (Line 8-9).
Create a for-loop to repeat for num times and prompt user to enter first name and last name and then store them in the firstName and lastName array, respectively (Line 11 - 17).
Create another for loop to traverse through the lastName and firstName array and display the last name and first name by following the format given in the question (Line 19 - 21).
The answer is D I’m 90% sure
Answer:
Prevent electrical shock
Grounding is a non current carrying conductor mainly used to guard against hazards due to leakage in electric circuits
Explanation:
The grounding refers to the connection of an electrical equipment exposed metallic parts to the ground to serve as a source of current flow in the event of an insulation failure will cause the fuses to trip thereby isolating or removing electric power from the device
Grounding also prevents the accumulation of static electricity which can be a source of fire in inflammable areas.
Answer:
def theRoundTrip(movement):
x=0
y=0
for i in movement:
if i not in ["U","L","D","R"]:
print("bad input")
return
if i=="U":
y+=1
if i=="L":
x-=1
if i=="D":
y-=1
if i=="R":
x+=1
return x==0 and y==0