Answer:
Follwing is the python code:-
word=str(input("Enter the string\n"))
new=word[0:3] #expression for first three characters of the string.
print(new)
Output:-
Enter the string
chandelier
cha
Explanation:
The expression word[0:3] is for extracting first three characters form the string.
word[0:3] = It extracts characters from index 0 to index 2 it does not include 3.3 is excluded.
Answer:
a = float(input("Enter Side A: "))
b = float(input("Enter Side B: "))
c = float(input("Enter Side C: "))
d = float(input("Enter Side D: "))
e = float(input("Enter Side E: "))
area1 = 1.0* a * b
area2 = (a - c) * (d - e -b)
area3 = 0.5 * (a - c) * e
print ("Room Area: " + str(area1 + area2 + area3))
Explanation:
happy to help ^3^
Network access limitations implemented from their local IT Department
Answer:d) Mono-alphabetic substitution rules
Explanation: Poly-alphabetic cipher is the cryptography that is done by using the many alphabets in substitutional way. They are supposed to have a good security because they use cipher text alphabets for the encryption and then decrypts it.
Substitution of the alphabets is done by the rule of the mono-alphabetic substitution rules.Other given options are incorrect because they are not used in the cryptography of the alphabetic cipher. Thus option (d) is the correct answer.
Answer:
import java.util.Arrays;
import java.util.Scanner;
public class num4 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("How many numbers? ");
int n = in.nextInt();
int []intArray = new int[n];
//Entering the values
for(int i=0; i<intArray.length;i++){
System.out.println("Enter the numbers");
intArray[i]=in.nextInt();
}
System.out.println(Arrays.toString(intArray));
int min =intArray[0];
for(int i =0; i<intArray.length; i++){
if(min>intArray[i]){
min = intArray[i];
}
}
System.out.println("The Minimum of the numbers is "+min);
}
}
Explanation:
- Using Java programming language
- Prompt the user for the number of values
- Using Scanner class receive and store in a variable
- Create an array of size n
- Using an for loop continuously ask the user to enter the integers
- Print the array of integers
- Using another for loop with an if statement, find the smallest element in the array of numbers
- Output the the smallest number