Answer:
Following are the expression to this question:
if (young and famous==True):
Explanation:
For print, the given expression the code requires some modification that can be defined as follows:
young = True#defining a bool variable that holds a value True
famous = True#defining a bool variable that holds a value True
if (young and famous==True):#defining if block that check variable value
print('You must be rich!')#print message
else:#else block
print('There is always the lottery...')#print message
Output:
You must be rich!
Code explanation:
In the above-given code, two variable "young and famous" is declared, that hold a "True" which is a bool value, in this code, a conditional statement has used, that checks variable value, which can be defined as follows:
- In the if block, it uses the above declared variable with and gate to check its value is equal to true.
- If the condition is true, it will print the true block message, otherwise, go to the else block in this, it will print the else block message.
Answer:
import java.util.*;
public class MyClass {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
System.out.print("Input a word: ");
String userinput = input.nextLine();
for(int i =0;i<userinput.length();i+=2) {
System.out.print(userinput.charAt(i));
}
}
}
Explanation:
This line prompts user for input
System.out.print("Input a word: ");
This declares a string variable named userinput and also gets input from the user
String userinput = input.nextLine();
The following iterates through every other character of userinput from the first using iteration variable i and i is incremented by 2
for(int i =0;i<userinput.length();i+=2) {
This prints characters at i-th position
System.out.print(userinput.charAt(i));
She would make use of JavaScript if she wants to make it interactive, CSS if she wants to design it, Text editor obviously for coding the blog and a web browser for the result hope this helps
Answer: False
Explanation:
The given statement is false as, a stored program computer is one of the type of computer system which storing the program instruction in the form of electronic memory.
- It perform different types of tasks in the sequence and it also enables the digital computer system more effective and flexible.
- In this stored program computer the program instructions are get stored on the plugboards.
Therefore, the given statement is false.