Its called a genesis program
Your issue is on line 19 in your if statement. In python, if you have more than one condition in an if statement, you have to explicitly mention it after the or.
Your if statement is
if again == "Y" or "y":
However, this will always return true because the second statement simply asks "y".
To correct this, simply change the if statement to:
if again == "Y" or again == "y":
This will correct your code.
Another thing to consider is to always convert a userinput (whenever possible) to one version, this can be accomplished in your code by converting "again" into one version by using the .lower function.
again = input("Would you like to draw a 3rd card? Y or N? ")
again = again.lower()
Hope this helps!
Answer:
Computer monitoring software
Explanation:
Computer monitoring software is used specifically for the purpose of recording keystrokes, logging the programs or Web sites accessed, or otherwise monitoring someone’s computer activity.
Answer:
RTT1+ RTT2+..... RTTn
Explanation:
The total estimated time to get the IP address is
RTT1+ RTT2+..... RTTn
Once the IP address is known, O RTT elapses to set up the TCP connection and another O RTT elapses to request and receive the small object. The total response time is
2RTT0+RTT1+RTT2+.....RTTn
Answer:
Following are the code to the given question:
import java.util.Scanner;//import package
public class OrderStrings // defining a class OrderStrings
{
public static void main(String[] args) //defining a main method
{
Scanner scnr = new Scanner(System.in);//defining a Scanner class object
String firstString;//defining a String variable
String secondString; //defining a String variable
firstString = scnr.next();//input value
secondString = scnr.next();//input value
if (firstString.compareTo(secondString) < 0)//use if to compare sting value
System.out.println(firstString + " " + secondString);//print sting value
else//else block
System.out.println(secondString + " " + firstString);//print sting value
}
}
Output:
rabbits capes
capes rabbits
Explanation:
In this code a class "OrderStrings" is defined inside the class the main method is defined that declares the two string variable that uses the input method to input the string value and after input, it uses the conditional statement. Inside this compareTo method is declared that compare string value and prints the string value.