1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Paul [167]
2 years ago
7

You have the opportunity to meet some droids and Wookies!

Computers and Technology
1 answer:
scZoUnD [109]2 years ago
5 0

Answer:

name = input("Enter name: ")

droids = int(input("How many droids you want to meet? "))

wookies = int(input("How many Wookies you want to meet? "))

   

print(name + " wants to meet " + str(droids) + " droids, and " + str(wookies) + " Wookies")

Explanation:

*The code is in Python.

Ask the user to enter the name, number of the droids and number of the Wookies

Print the name, number of the droids, and number of the Wookies

Note that while getting the input for the droids and wookies, you need to typecast the input the int (Since the values are int). Also, to print these variables, you need to typecast them as string in that format.

You might be interested in
If your TV was showing a flat black or blue screen, or had "snow", what steps would you take to fix it?
ladessa [460]

Answer:

Assuming that TV was working fine and it stopped working when you restart or after power shutdown. Flat Black or blue screen or snow are all seems to be having HDMI cable sync issues. It can be fixed based on the model of the TV and connectivity it is using.

I would suggest to start with very basic step and should go step by step unless we narrow down the problem.

  1. <em>Turn off all the components, unplug the cables and plug them back by leaving HDMI cables intact. So this process will reset all the units and may help in renegotiation.</em>
  2. <em>Plug all the cables and Turn on the TV.  Plug all other components like sound receiver and source device and Turn on the power.  This may solve the problem.</em>
  3. <em>If issue still persist. Unplug and Plug back HDMI cables and surrounding components in HDMI path. It may solve the issue.</em>
  4. <em>If the issue still persists, then change the HDMI cable itself and try rebooting all components.</em>
  5. <em>If input is changed then it might have caused the issue. So identify the cable from the receiver to the TV.  figure out its input and change the TV input to that value and it will work.</em>
  6. <em>In some TV's if power reset happens, It may revert to TV mode then change the video input based on your TV model.</em>
  7. <em>If the receiver is connected to TV via Coax then change the channel as per TV guide.</em>
  8. <em>If the receiver and its component is using AV or HDMI then use TV remote to change the input source until correct feed is found.</em>
  9. <em>If issue still persist, check the cable with another TV and see if it works. If its not then cable is at fault.</em>
  10. <em>If the cable is fine then change the TV and try above steps.If it works then TV is at fault.</em>

Explanation:

7 0
3 years ago
Create a class named Console, and move all the methods that retrieve and validate user input to that class. These methods can re
otez555 [7]

Answer:

Here is the Console class:

import java.util.Scanner;  // to accept input from user

public class Console {   // class name

public Console() {}   //class constructor

public int getInt(Scanner sc, String prompt) { //gets user's number  

int i = 0;   //initialize i to 0

boolean isValid = false;   // checks for valid input

while (!isValid) {   //loop iterates as long as input remains valid

System.out.print(prompt);   //displays prompt

if (sc.hasNextInt()) {   // checks for the next token (input number)

i = sc.nextInt();   // scans and reads the next number

isValid = true;   // checks if input is valid

} else {   //if input is not valid

System.out.println("Error! Invalid integer value. Try again.");  }  //displays error message

sc.nextLine(); // discard any other data entered on the line   }

return i;  }  //returns number

public int getIntWithinRange(Scanner sc, String prompt, //checks users guess if outside parameters or not  

int min, int max) {  

int i = 0;  

boolean isValid = false;   //sets isValid to false

while (!isValid) {   //keeps iterating and stops when isValid is false

i = getInt(sc, prompt);   //calls getInt method to get users number

if (i <= min) {   //if number is less than value of min

System.out.println("Error! Number must be greater than " + min);   //displays this message

} else if (i >= max) {   //if number is greater than that of max

System.out.println("Error! Number must be less than " + max);   //displays this message

} else {   //if guess is right

isValid = true;   } } //sets isValid to true

return i;  } //returns that number

public  String getRequiredString(Scanner sc, String prompt) { //Asks for user's string input  

String s = "";  

boolean isValid = false;   //sets isValid to false

while (!isValid) {      //keeps iterating and stops when isValid is false

System.out.print(prompt);    //displays prompt

s = sc.nextLine();   //reads next line (read next string input value)

if (s.equals("")) {   //if user enters nothing

System.out.println("Error! This entry is required. Try again.");   //display this message

} else {   //if user enters a string input

isValid = true;   }  }  //sets isValid to true

return s; }  //returns string

public  String getChoiceString(Scanner sc, String prompt, //Checks for users input for Y/y ignores caps  

String s1, String s2) {

String s = "";  

boolean isValid = false;   //sets isValid to false

while (!isValid) {   //iterates until isValid is false

s = getRequiredString(sc, prompt);   //calls method to get the input string

if (!s.equalsIgnoreCase(s1) && !s.equalsIgnoreCase(s2)) {  // checks users input for Y/y ignores caps  

System.out.println("Error! Entry must be '" + s1 + "' or '" + s2 + "'. Try again.");   // displays error message that entry must be y or Y

} else {   //if user enters y or Y

isValid = true;   } }   //sets isValid to true

return s;  } } //returns y or Y

Explanation:

Here is the Game class

public class Game {  // class name

public Game() {}   //class constructor

public void displayWelcomeMessage() { //displays message  

System.out.println("Welcome to the Guess the Number Game");  

System.out.println("++++++++++++++++++++++++++++++++++++");  

System.out.println(); }

public  void displayPleaseGuessMessage() { //displays message for user to guess from 1-100  

System.out.println("I'm thinking of a number from 1 to 100.");  

System.out.println("Try to guess it.");  

System.out.println();}

public  void displayCorrectGuessMessage(int counter) { //display user's current guess count

System.out.println("You got it in " + counter + " tries.");  

if (counter <= 3) {   //if user guesses the number in 3 or less tries

System.out.println("Great work! You are a mathematical wizard.\n");  

} else if (counter > 3 && counter <= 7) {   //if user guesses the number greater than 3 but less than or equals to 7 tries

System.out.println("Not too bad! You've got some potential.\n");  

} else {   //if user guesses the number after more than 7 tries

System.out.println("What took you so long? Maybe you should take some lessons.\n"); }}

public  void displayGuessAgainMessage(int number, int guessNumber) { //Asks user to guess again  

int difference = guessNumber - number;  

if (guessNumber > number) {   //if guessNumber is greater than number

if (difference > 10) {   //if difference between guessNumber and number is greater than 10

System.out.println("Way too high! Guess again.\n");   //guessed number is higher than correct one

} else {  

System.out.println("Too high! Guess again.\n");  }

} else {  

if (difference < -10) {   //if difference between guessNumber and number is less than -10

System.out.println("Way to low! Guess again.\n");   //guessed number is lower than correct one

} else {  

System.out.println("Too low! Guess again.\n");}}}}

The main program and explanation of these above programs are given in the attached document.

The output of the program is attached.

3 0
2 years ago
Which of the following is not a skill set required by data scientists? A. Programming expertise B. Big data expertise C. Telecom
ziro4ka [17]

Answer:

Explanation:Option C is the correct answer.

8 0
3 years ago
Which of the following is a correct definition of the term rectification? A. Rectification is the opposition to current flow in
AlekseyPX
Rectification is "C. The conversation of an AC current to a DC current
5 0
2 years ago
Read 2 more answers
In which of the following situations should you expect to provide your Social Security number?
sveta [45]
Hey there!

Some situations you'd need to provide your SSN include when applying for insurance through an insurance company, when applying for a loan or a credit card (or any other company that you're sending a credit application to), banks, investment advisors, and cash transactions over $10,000, such as when buying a car. Also, if you are going to college with financial aid, colleges will collect your SSN. If any other business requests your SSN, they are legally allowed to, however, it's optional. It's also optional when applying for a job at a company, but might affect your chances at getting the job depending on the employer who may want to get credit statistics on their potential employees. 

Hope this helped you out! :-)
7 0
2 years ago
Other questions:
  • What Software is used to play,create, and modify audio and video files
    7·2 answers
  • Discuss why mtv initially had a difficulty securing enough ads
    10·1 answer
  • In the lan protocol architecture the _________ layer is responsible for detecting errors and discarding any frames that are in e
    13·1 answer
  • How do you compare text on different pages of a document?
    14·1 answer
  • Write a program to accept 10 different whole number from the user and store them in a
    11·1 answer
  • Describe an energy problem a city in 2050 will face
    6·1 answer
  • Function of dobji dzong​
    14·1 answer
  • Tommy loves taking care of homing pigeons. He sent a note to his crush who lives 24.0 km away from his house. These birds fly at
    9·1 answer
  • mary needs to rename her report.txt file to final_report.txt. which command will allow her to do this?
    10·2 answers
  • What is keyword density?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!