Exercise 5 Ask the user if they "love or hate" then take the input. If they answer with love then print out "I love python" 10 times first using the for loop then again but using the while loop. Otherwise, if they answer with hate then print out "I hate python" 10 times first using the for loop then again but using the while loop. If the user inputs anything else tell them "Why are you being a bad user?"
Q: Your task is to check whether java is perfectly installed on your computer or not. for this, you hav...
A: This program will help you out to get all properties of installed java in your system: package com.m...
Q: Find the logic error(s) in the following recursive function, and explain how to correct it (them). T...
A: def sum(n): if n == 0: return 0 else: return n + sum(n) Logical errors are If n == ...
Q: What is 34h AND ABh (3416 AND AB16)? Group of answer choices 1)56h (56₁₆) 2)43h (43₁₆) 3)35h (35₁₆) ...
A: 34h AND ABh (3416 AND AB16) is 43h (43₁₆) i.e. option B is correct
Q: True or False: Threads in the same process share a stack. Explain your response in as few words as p...
A: The straight forward answer for the above question will be False
Q: images for the last
A: Different clipart images can be inserted into word by using insert option Inserting the required cli...
Q: Python method for calculating the length of a String without the use of the len() function
A: Let us define a method called countLength() which accepts a user defined string as input and return ...
Q: Why was BASIC good in the past? Why have we moved to Python? Feature-by-feature, how powerful is BAS...
A: Lets see the solution in the next steps
Q: What are the intercloud challenges? [U]
A: Introduction: Intercloud, often known as a "cloud of clouds," is a theoretical model for cloud compu...
Q: Guide: How a Bill Becomes a Law Steps: 1. Bill Introduction a. Ideas and language for bils may come ...
A: Step:1 Bill Introduction (B) But only members of the house of representatives of the senate can intr...
Q: does the MLFQ scheduler ensure that interactive jobs are running quickly? (You should think about
A: Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling Prerequisite – CPU Scheduling, Multilev...
Q: Modify the scripts of Projects 1 and 2 to encrypt and decrypt entire files of text. An example of t...
A: Algorithm: Start Read input and output file names Read shift Open input file and read the text and...
Q: ease do quick..
A: Converted given NFSA TO DFSA
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: 15.a. How can a poorly attached connector affect signal strength in a fiber optic cable? A. Insertio...
A: Asper bartleby guidlines we are allowed to answer only one question please post them separately.
Q: need to print only the column on the left, how do I do this?
A: To print any column of dataframe we just need to call the function: df.iloc[:, (column number starti...
Q: A class Person is given below as your base class. Your task is to create a class Employee which will...
A: The solution to the given problem is below.
Q: Why is it a good idea to first write out an algorithm in pseudocode rather than jumping immediately ...
A: Answer:
Q: 1. If I'm using the and operator with two conditions that are both false, what is the boolean value?
A: For given two conditions like condition1 and condition2 with a (&&) ampersand symbol, if bot...
Q: ons of the benchmark is increased by 10% without affecting the CPI
A: given - Find the increase in CPU time if the number of instructions of the benchmark is increase...
Q: Give five (5) sample source code and simulations of Try Catch Java
A: try{ // code } catch(exception) { // code }
Q: What is the best course of action for dealing with the Denial of Service assault based on the iPremi...
A: Introduction: Denial of Service (DoS) assaults are on the rise and pose severe problems for cyber se...
Q: Give me an example of f formatted string in python. Take all the data from the user.
A: Python documentation states that... Formatted string literals (also called f-strings for short) let ...
Q: Can you conceive of scenarios where range controls and null value controls will enhance data integri...
A: Introduction: Data integrity is the act of ensuring the correctness and consistency of data througho...
Q: a TCP / IP client - server application in which o client will be able to request the execution of si...
A: Lets see the solution in the next steps
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: ur task is to check whether java is perfectly installed on your computer or not. this, you have to p...
A: Lets see the solution.
Q: Write a C# program that using loops keeps asking the user to enter a number until the 5th even numbe...
A: I have provided C# CODE along with CODE SCREENSHOT and also provided OUTPUT SCREENSHOT...
Q: Using a single print command, print the list of odd entries in x and then the list of even entries i...
A: The following is the one-line statement which prints the odd elements and even elements: print([i ...
Q: What is the most popular programming interface and programming language for developers in the world'...
A: PROGRAMMING INTERFACE: An integrated development environment (IDE) is more than just a text editor....
Q: Without using any loop In PHP programming languague The value of the input variable is 9 3,5,578 How...
A: Here is your solution with an output.
Q: 2. Given the following NFA and E = {0, 1} State diagram for an NFA 0,1 1 92 93 Graßtate
A: Defined the given NDA generate the regular expression
Q: I'd like to send in a PowerPoint presentation to have the APA citations and references checked again...
A: Answer Include the name of the author (whoever presented the PowerPoint), the data it was delivered,...
Q: why is this html does not shows the "logout button ? how to fix it ?
A: You need to log in first then the "LogOut" button appears to you... When you log in then you see the...
Q: Write a Java program to convert the decimal number to binary number. Take the decimal number from th...
A: According to the Question below the Solution: Output:
Q: Give five (5) real life applications using Try-Catch
A: INTRODUCTION: The try-catch block in Java is used to manage programmatic exceptions. The code in the...
Q: Using the function from the previous problem, write a function durdle_game(target) which takes in as...
A: Please find the answer below :
Q: (GREATEST COMMON DIVISOR) The greatest common divisor of integers x and y is the largest integer tha...
A: code snippet:
Q: IN a flowchart Download the Flowgorithm file HazelsPartial.fprg and complete the program that calcul...
A: So in this problem, you have asked to write a program that calculates service charges for Hazel’s Ho...
Q: Give me an example of f form tted string in python. Take all the data from the user.
A: Given :- Give me an example of f formatted string in python. Take all the data from the user.
Q: What will be the output of the program ? #include int main() { int k=1; printf("%...
A: Here % d is for integer k that is k== 1. Now condition is checked with the help of ternary operato...
Q: Customer Support, Inc. (CSUP) is a large corporation with international clients that provides custom...
A: This object must have a uniqueId instance variable. Need all getters and setters and toString method...
Q: What role does the TCP/IP protocol play in LANs? Give two concrete examples.
A: Introduction: TCP/IP (Transmission Control Protocol/Internet Protocol) is a communication architectu...
Q: Using computers and other automated tools to grade true-false and multiple-choice tests is widesprea...
A: Some Suggestion on Above Question are Here: imagine taking a college examination, and, alternatively...
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: he whole thing starts about twelve, fourteen or sev include include include sing namespace std; n...
A: Lets see the solution.
Q: iv) Define a Python function that takes an integer n as the parameter and returns true if n is in th...
A: Define a Python function that takes an integer n as the parameter and returns True if n is in the ra...
Q: What will be the content of 'file.c' after executing the following program? #include int main() { F...
A: This is the minified version of the code written. So the code written in a correct way is as under: ...
Q: Give me an example of f formatted string Ih nython Take all the data from the user.
A: f formatted strings are the strings that are easy to write the formatted pattern and we can include ...
Q: Suppose you have a table t with a column labeled 'XYZ. What is the difference between t.YYZ.cumsum()...
A: Answer: For each row of the table t.YYZ.cumsum() sum of the all values of the column XYZ. For each r...
Step by step
Solved in 3 steps with 1 images
- Write a program that asks the user for a number of integer test scores. It then has the user enter that number of scores and computes the average. Ex: If the input is: 5 95 90 82 88 87 the output is: Your test average is: 88.4 You can assume that the first number is greater than 0. Hint: Use a loop to calculate the sum. When you are done with the loop, calculate the average. pythonUsing a while loop, write a code that asks the user “What is 7 multiplied by 5?”. Whenthe user answers the question incorrectly, ask them again but give them a hinton whetherto go higher or lower. Continue to prompt for a response until they get the correctanswer. However, if they do not get the answer after 5 tries, exit the loop and tell themthe answer. USing Python!Write a program that will print the message “Computer Science is cool!!” 10 times. Use a while loop.2. Instead of printing 10 times, ask the user how many times the message should be printed. You will need to declare a variable to store the user’s response and use that variable to control the loop. 3. Number each line in the output, and add a message at the end of the loop that says how many times the message was printed. So if the user enters 3, your program should print this:
- Write a program that will print the message “I love computer science” 12 times. Use a while loop. Instead of printing 12 times, ask the user how many times the message should be printed. You will need to declare a variable to store the user’s response and use that variable to control the loop. Number each line in the output, and add a message at the end of the loop that says how many times the message was printed. So if the user enters 3, your program should print this: _____________________________________ 1 I love computer science 2 I love computer science 3 I love computer science This message is printed 3 times.Write a program that will print the message “Computer Science is cool” 10 times. Use a while loop. Instead of printing 10 times, ask the user how many times the message should be printed. You will need to declare a variable to store the user’s response and use that variable to control the loop. Number each line in the output, and add a message at the end of the loop that says how many times the message was printed. So if the user enters 3, your program should print this: _____________________________________ 1 Computer Science is cool 2 Computer Science is cool 3 Computer Science is cool This message is printed 3 times. _____________________________________Use a while loop to repeatedly take input from the user and print whatever they type in. When the user enters the empty string (""), then your program should stop. For simplicity, you should print the empty string typed by the user at the end. Be very careful that you don't end up with an infinite loop! Python!
- Write a program that inputs your student number and printout your Biography when the student numberis correct. Use a Do While / While loop to repeat the process when an incorrect student number is placed.Write a program that inputs your student number and printout your Biographywhen the studentnumber is correct. Use a Do While / While loop to repeat the process when an incorrect student number is placed. (C++)***python only*** What is output of the following program, if the user input are x=5 and y=11? def main() : x = int(input('Enter value for x:')) y = int(input('Enter value for y:)) c = 1 if (x + 2 <y-5): print("This is case 1) c += 2 else: print("This is case 2") c = (x + y) // 3 print('c=', c) while x < y: print(x, "and",y) x = x + c y = y - 1 print("After loop: %s and %s." % (x, y)) main()
- Using a loop, extend the program to handle multiple lines of input. Continue until the user enters q to quit. Ex: Enter input string: Jill, Allen First word: Jill Second word: Allen Enter input string: Golden , Monkey First word: Golden Second word: Monkey Enter input string: Washington,DC First word: Washington Second word: DC Enter input string: q python(Python) Which is the correct answer? This loop is best when you want the loop to run X amount of times. a. loopX b. while c. for d. do whileWhile loops What would the output of the following code be when executed? A = 19 B = 7 while A > B: print (A,B) if (A + B) < 24: B = B + 5 else: A = A – 2