Exercise 2 Make a program that checks inputs as strings. Prompt the user for a yes or no question. If the user answers yes then tell them they won 1 million dollars. If no then tell them that they need to go wash the dishes. If they dont give one of those answer tell them they must enter a correct answer and rerun the program
Q: Explain what the CPU should do in the event of an interrupt. Include the mechanism the CPU employs t...
A: Interrupt:- An interrupt is a signal which is sent to the processor emitted by hardware or software,...
Q: People who work with computers and humans use a lot of different ways to measure how well they work ...
A: Introduction: He addresses a vision articulated in his latest book Superminds a framework for reachi...
Q: You are tasked with helping write part of an exciting new word-guessing game, “Durdle”. The game is ...
A: Python code: def durdle_match(a,b): for i in range(5): if(a[i]==b[i]): print("G...
Q: Difference between DBMS and RDBMS?
A: DBMS stores information as a file. RDBMS stores information in the plain structure.In DBMS Informati...
Q: l Use of Airspace (Regulatory)?
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN ...
Q: What's the distinction between direct and indirect addressing? Give a specific example.
A: Addressing mode is the concept in operating system which are responsible in mapping the operand with...
Q: A certain computer password consists of 3 through 5 uppercase letters chosen from the 26 letters in ...
A: The addition rule provides the foundation for calculating the number of elements in a union, differe...
Q: Q.1: MIPS is an architecture having its own Assemb assembly Language. Differentiate between Assembly...
A: given - Q-1: MIPS is an architecture having its own Assembly Language. You are learning x86assembly ...
Q: ate the Fragments-type app, -firstinitialLastnameFragmen ments as is done in the vide karound colors...
A: Ans: <!-- Base application theme. --><style name="AppTheme" parent="Theme.AppCompat.Light.N...
Q: Let L be the list of non-negative integers and K is the search key. The goal is to find K in L. If t...
A: Brute Force search technique can enumerate all possibilities to search an element in a given list. ...
Q: How can mac addresses and IP addresses help you protect your device on a network, or how can they be...
A: Introduction: The Mac address can determine the number of senders and receivers in a network. Becaus...
Q: People who work with computers and humans use a lot of different ways to measure how well they work ...
A: Introduction: He addresses a vision articulated in his latest book Superminds a framework for reachi...
Q: I am learning c++, I have trouble understanding bool command. Please explain it to me, and give me s...
A: Hi, let us understand "bool" in c++. Bool is a data type in c++. Just as an "int" data type stores a...
Q: What ps -x command do ? and then explain the purpose (the different parameters/info of the output)? ...
A: Answer: 1. ps -x command: The ps command displays the currently running processes in the system. It...
Q: Suppose you have an investment plan where you invest a certain fixed amount every year. Modify futva...
A:
Q: People who work with computers and humans use a lot of different ways to measure how well they work ...
A: Usability testing is a proven method to evaluate your product with real people. And usability testi...
Q: Give me an example of f formatted string in python. Take all the data from the user.
A: Required:- Give me an example of f formatted string in python. Take all the data from the user. Appr...
Q: Which of the following is not a valid Python comparison operator: O !-
A: Python: Python is a general purpose programming language developed by Guido Van Rossum in 1989. Pyth...
Q: Trace and write possible output or find an error in the following program segment. using namespace ...
A: - We need to test the provided snippet. - In the code we have initialised q as 2.1 and passing thi...
Q: ila) - I have no idea what this is asking. I've done the Sakila part of it and it's asking for: in t...
A: Any feature, characteristic, number, or quantity that grows or decreases over time or may take on va...
Q: 2. Using DeMorgan's theorem simplify the following expression, and write in SOP form: (a' + bc')'
A: Here in this question we have given an expression and we have asked to simplify using demorgans theo...
Q: Example 2: Give the description of given FSM: A
A: Given:
Q: a. if num2 > 5: print ("Big") else: print ("Small") b. if numl == 5: print("Message 1") else: print(...
A: As per our guidelines we are supposed to answer three sub parts kindly repost other sub parts as a s...
Q: Your task is to check whether java is perfectly installed on your computer or not. for this, you hav...
A: Task : Get vendor name Get vendor url Get Java Runtime version Get Java Version
Q: Linear BVP Make a matlab function that input a number (n) and output y’(xi) in which y the BVP appr...
A: Lets see the solution in the next steps
Q: Write a Java program to convert the decimal number to binary number. Take the decimal number from th...
A: PROGRAM INTRODUCTION: Import the required libraries. Start the definition of the main function. Dec...
Q: Despite the fact that the number of Cisco employees has doubled, the number of STs has remained the ...
A: Introduction: Cisco is one of the world's foremost information technology companies, number 63 on th...
Q: Do you think using Virtual reality is dangerous?,
A: Answer: Yes, using Virtual reality is dangerous.
Q: Write a Java program to convert the decimal number to binary number. Take the decimal number from th...
A:
Q: I'd like to send in a PowerPoint presentation to have the APA citations and references checked again...
A: Introduction: Include the name of the author (whoever presented the PowerPoint), the date it was del...
Q: Write a program in php to check whether a given array is sorted in descending order
A: This is the program in PHP to check if the array is in descending order or not. If it is not in desc...
Q: How do you guarantee that each machine utilises its own private key pair while using IPsec?
A: Introduction: How do you guarantee that each machine utilizes its own private key pair while using I...
Q: Write a program that starts out by flashing an LED connected to pin7 at 2Hz. On a button press (butt...
A: Given :- Write a program that starts out by flashing an LED connected to pin7 at 2Hz. On a button pr...
Q: TCP connection
A: TCP has flow control mechanism implemented so that the sender does not overwhelm the receiver by sen...
Q: Transform the postfix expression to infix form. Show ALL the steps. a. A B * CDE - +
A: The fundamental manner to transform postfix to infix is:- We have a prefix studying column wherein...
Q: Consider the following CFG: Starting variable: S Terminals: (0, 1) Productions: O S-> ABA | SS • A->...
A: Given The answer is given below.
Q: If the file 'source.txt' contains a line "Be my friend" which of the following will be the output of...
A: FILE *fs, *ft; two file pointer declared char c[10]; means a string "c" stores 10 characters fs...
Q: Problem B. Counting Glorious Create another function count_glorious(low, high) that takes in two p...
A: According to the Question below the Solution: Output:
Q: HINT: Use constants to store values that do not change throughout your program. For instance, in thi...
A: C++ program which promote the user to enter salary and calculate the expenditure and tax payed .
Q: 20.a. What should be done with a cable that contains an obsolete connector? A. The connector should ...
A: 20 a ) obsolete connecter means the connector that is out of date or no longer in use. for such case...
Q: What precisely is the JDBC Driver?
A: Answer: A JDBC driver is a piece of software that allows a Java application to interact with a datab...
Q: Give me an example of f formatted string in python. Take all the data from the user.
A: i give the code in Python along with code and output screenshot
Q: Give a big-Oh characterization in terms of n, of the running time of the following code fragments P...
A: Given :- Give a big-Oh characterization in terms of n, of the running time of thefollowing code frag...
Q: fahrenheit = celsius*9/5+32 1. What is the order of calculations in the conversion of a temperature?...
A: As per our guidelines, we are supposed to answer only one question. Kindly repost the remaining ques...
Q: Given the two arrays below, write a C++ program to multiply the elements at the same index in both t...
A: Given: Arr1: [11, 23, -54, 41, 22, 10]Arr2: [-12, 45, -34, 121, 16, 4] Requirement: Write a C++ prog...
Q: Write a program in S that computes the function f1(x) = 3x – 3. If you need any macros, please defin...
A: In this question, we are asked to write a program which display the solution of f1(x) f1(x) = 3 * x ...
Q: images for the last
A: Different clipart images can be inserted into word by using insert option Inserting the required cli...
Q: Explain the fetch-decode-execute cycle's steps. What happens in the various registers should be incl...
A: Given The answer is given below.
Q: I need help in this following mcq? What is NOT 123h (12316)? Group of answer choices 1)DEFh (DEF16)...
A: Hexadecimal number start from 0 to 15 (with base 16) NOT 123h (h or 16 represent hexadecimal number)...
Q: :What is the solution of the Vacuum problem?
A: Below find the solution. Vacuum cleaner problem is a well-known search problem for an agent which wo...
We didn't mention programming language so we have answered in python langauge.
Given:
Make a program that checks inputs as strings. Prompt the user for a yes or no question.
If the user answers yes then tell them they won 1 million dollars. If no then tell them that they need to go wash the dishes.
If they dont give one of those answer tell them they must enter a correct answer and rerun the program
Step by step
Solved in 5 steps with 3 images
- Seasons Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an integer to represent the day. The program stops when input is Quit. Note: "Quit" is the one that Stop The Loop. Ex: If the input is: April 11 the output is: Spring In addition, check if the string and integer are valid (an actual month and day). Ex: If the input is: Blue 65 the output is: Invalid The dates for each season are: Spring: March 20 - June 20 Summer: June 21 - September 21 Autumn: September 22 - December 20 Winter: December 21 - March 19 Please submit your source.java file as well as the sample run (input and output) in a text file. ThanksWrite a program that generates a random number between 1 and 100 and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display “Too high. Try again.” If the user’s guess is lower than the random number, the program should display “Too low. Try again.” The program should use a loop that repeats until the user correctly guesses the random number. Then the program should display “Congratulations. You figured out my number.”user if the guess is too high or too low or is correct. 3. Using nested for loops, right a program that displays a bar chart (using asterisks) for a number entered by the user. For example, if the user enters 4, the bar chart looks like this: 4: **** Do this five times total. Write a program tha ddivi
- A Prime Number, is a number that can be divided evenly only by 1, or itself. Write a Java program, that prompts the user toenter a number, and determines if it is a prime or not. Use while-do loopCalculating Student Grades Help Professor Navi to calculate the average score and letter grade for his students in CS119. Write a program in Python using only conditional statements and loops(DO NOT USE FUNCTIONS) to : Ask how many students Professor Navi has in his CS119 Your program should loop asking for the following data: Ask the student name Ask for 3 exam scores. Calculate the average score. Using a bunch of IF conditions, the computer should determine the grade and display the grade to the user. Use the following Criteria: If Average is 98-100… Assign the grade “A+” If Average is 95-97.99… Assign the grade “A” If Average is 91-94.99… Assign the grade “A-” If Average is 88-90.99… Assign the grade “B+” If Average is 84-87.99… Assign the grade “B” If Average is 80-83.99… Assign the grade “B-” If Average is 75-79.99… Assign the grade “C+” If Average is 70-74.99 Assign the grade “C” If Average is less than 70 and greater than 60 assign grade “D” If Average is less…Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outputs Yes if every character is a digit 0-9. Ex: If the input is: 1995 the output is: Yes Ex: If the input is: 42,000 or 1995! the output is: No Hint: Use a loop and the Character.isDigit() function.
- Write a program that generates a random number and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display “Too high, try again.” If the user’s guess is lower than the random number, the program should display “Too low, try again.” The program should use a loop that repeats until the user correctly guesses the random number.Volume and Area of a Regular Icosahedron An icosahedron is a regular polyhedron with 20 congruent equilateral triangular faces. Ask the user to supply the length of one of the edges (one side of a triangular face) and then calculate the total surface area and volume of the icosahedron. Report the answers and then repeat. Your program should loop until the value 0 is entered for the radius – and then it should promptly exit. Only positive numbers are allowed for the length of the edge. ???? =? √?∗?? ??????=?/?? (?+ √?)∗ ?3Volume and Area of a Regular Icosahedron An icosahedron is a regular polyhedron with 20 congruent equilateral triangular faces. Ask the user to supply the length of one of the edges (one side of a triangular face) and then calculate the total surface area and volume of the icosahedron. Report the answers and then repeat. Your program should loop until the value 0 is entered for the radius – and then it should promptly exit. Only positive numbers are allowed for the length of the edge. ???? =? √?∗?? ??????=?/?? (?+ √?)∗ ?3 assembly
- Basic while loop expression. Write a while loop that prints userNum divided by 4 (integer division) until reaching 2 or less. Follow each number by a space. Example output for userNum = 160:40 10 2 Note: These activities may test code with different test values. This activity will perform four tests, with userNum = 160, then with userNum = 8, then with userNum = 0, then with userNum = -1. See "How to Use zyBooks".Also note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds, and report "Program end never reached." The system doesn't print the test case that caused the reported message.Write a program that generates a random number and asks the user to guess what the number is. If the user's guess is higher than the random number, the program should display "Too high, try again." If the user's guess is lower than the random number, the program should display "Too low, try again." The program should use a loop that repeats until the user correctly guesses the random number. Program should count and display number of tries to win the game. (Use for loop to solve the problem) Python programI can't figure this one out for the life of me. I've been stuck on it for 4 hours now... HELP! The programming language is python Write a program that prompts the user to enter a series of strings, but with each string containing a small integer. Use a while loop and stop the loop when the user enters a zero. When the loop has finished, the program should display: the number of user inputs (not counting the final zero input). the total of the integers in the strings entered. the average of the integers accurate to one decimal place.