Answer:
Explanation:
StringRecursiveReversal.java
public class StringRecursiveReversal {
static String reverse1 = "";
public static String reverse(String str){
if(str.length() == 1){
return str;
} else {
reverse1 += str.charAt(str.length()-1)
+reverse(str.substring(0,str.length()-1));
return reverse1;
}
}
public static void main(String a[]){
StringRecursiveReversal srr = new StringRecursiveReversal();
System.out.println("Result: "+srr.reverse("flow"));
}
}
Output :
Result: wolf
Answer:
Local Area Network ...LAN...
covers a small area like a home or building
Metropolitan Area Network ...MAN...
covers a area like city or county
Explanation:
Hope this will help
import math as m
def print_word(N, W, retries = 4):
for _ in retries:
if(N > 100 or N < 0 or len(W) > 50):
print("Number is out of range or word is too large. Try again.")
new_word = str(input("New word: "))
new_num = int(input("New number: "))
if(new_num >= 0 and new_num <= 100 and len(W) <= 50):
for row in new_num:
print(new_word)
return "Thank you for your time!"
if(N >= 0 and N <= 100 and len(W) <= 50):
for row in N:
print(W)
return "Thank you for your time!"
try:
N = m.floor(int(input("Enter a number from 0 to 100: " )))
W = str(input("Enter a word: "))
except ValueError:
print("Invalid Input!")
print(print_word(N,W))
Explanation:
<h3>HOPE IT WILL HELP YOU TO SOLVE YOUR PROBLEM.</h3>
Answer:
The program in Python is as follows:
first = int(input())
second = int(input())
third = int(input())
s = first * second * third
print(s)
Explanation:
This prompts the user for first input
first = int(input())
This prompts user for second input
second = int(input())
This prompts user for third input
third = int(input())
This calculates the product
s = first * second * third
This prints the calculated product
print(s)