C level program 1. Write a program that takes an integer n as input (from Keyboard) and compute and display (a) The sum of digits. (b) The integer with digits reversed, and multiplied by 3. For example, if the input is 4318, then in part (a), you'll display integer 4318, and sum of digits 4 +3+1+8 = 16; and in part (b), you'll compute and display 8134 and also 24402, which is 4318 * 3. (c) Test your program with 3 integers: 4318, 401, and an integer of 5 digits of your choice. Show and explain source code and show output
Q: 4. Suppose we have the following data from n patients: Patient 1 Patient 2 Patient 3 Age Weight…
A: Python which refers to the one it is a high-level, general-purpose programming language. Its design…
Q: 4. Which of the following statements is NOT correct? (a) If LR is regular, then L is regular. ( b)…
A: Dear Student, The answer to your question with proper explanation is given below -
Q: Q2) Write a Fortran90 program using DO loops to find the summation of the first 5 terms of the…
A: Here is the fortran90 program of the above problem. See below steps.
Q: Question # 4: Use the Vigenere Cipher method to encrypt the following “PLEASE SEE ME TOMORROW”. Key…
A: Answer: We have explain in details how to use Vigenere Cipher method to encrypt the following so we…
Q: Question # 1: Use the Affine cipher method to encrypt the following plaintext: Summer Term Completed…
A: : Use the Affine cipher method to encrypt the following plaintext:Summer Term CompletedKey pair (K1,…
Q: Flowchart diagram shows occurence frequency of a variable. true or false?
A: A computer algorithm, system, or process is depicted in a flowchart. They are widely used in a…
Q: What, precisely, is meant by the phrase "debugging"?
A: Debugging: Debugging is the act of locating and fixing mistakes in software code, both those that…
Q: How many nodes at most are in the 6-th level of binary tree? (A) 2 (B) 31 (C) 32 (D) 64
A: The solution is given in the below step with explanation
Q: Let G = (V, E) be a connected, undirected graph. Let A = V, B = V, and f(u) = neighbours of u.…
A: Dear Student, The answer to your question is given below -
Q: Which of the following statements is incorrect? - Assembly language gives the programmer complete…
A: The solution to the given question is: The incorrect statement is "Assembly language gives the…
Q: 24. Suppose that the variable x is a two-dimensional list that is 5-by-5 in size. Write a line of…
A: - We need a python line to make the center of a matrix to be 0.
Q: R is (A, B, C, D, E, F, G) with FD's {A-BC, BC- DE, CF→G} 5.a. Calculate (AB)* 5.b. 5.c. Calculate…
A: Answer: We need to write the closure of the given key and also we will see what will be the…
Q: The evolution of a programming language: how would you describe it
A: Programming language: The gadget must be given instructions in the programming language it can…
Q: I need it to be solved with C# Please make a program that generates 1000 random numbers. Program…
A: Answer: Algorithms: Step1: We have create a class Random Number Step2: Then we have initialized the…
Q: For the following declaration, write the codes as asked. The pointer variable first points to the…
A: A) Delete the node that is to the right of the node pointed by b if (b->next != NULL) {…
Q: Question Pap write an assembly code to: (a) Save an array consisting of 10 elements (b) to search…
A: First, we will create an array of 10 elements. Then we will create another variable to store the…
Q: The new VP of Business Development is a very ambitious lady. She wants to store a photograph of…
A: If images have to be stored on their own servers, we can use CDN (content delivery network ) where…
Q: WRITE THE OF MYSQL IN PYTHON, JUST ANSWER THE 2ND QUESTION BY LOOKING AT THE FIRST QUESTION Create…
A: Dear Student, The required code to fill each table is given below -
Q: Select all information about professor whose name is ‘Ali’
A: Solution: Given,
Q: 6.1.1 The Stack Abstract Data Type Stacks are the simplest of all data structures, yet they are also…
A: We will be solving this question using stack in Java. Below is the solution.
Q: Give 3 example of bad interface design of Udemy webiste and what can udemy do to improve it. This is…
A: According to the information given:- We ahev to describe bad interface design of Udemy website and…
Q: Translate the following signed decimal numbers to binary -35 -78 7 -1 [Choose ] [Choose ] [Choose]…
A: There are various direct or indirect methods in order to convert a decimal number into binary…
Q: Explain the advantages and disadvantages of operating in the cloud environment. How does this affect…
A: Cloud computing Cloud computing is used to describe the delivery of a on-demand computing resources…
Q: C++,thanks! 7.Write a function to calculate the sum of the even number from 1 - 100.
A: The above question that is Write a C++ function to calculate the sum of the even number from 1 - 100…
Q: What is the output of a 5-nn (Nearest neighbor classiier)? Show all your steps.
A: Given, x y 1 0 2 0 3 1 6 1 6 1 7 0 10 0 11 0 knn=5 i.e., 5 nearest x-values…
Q: Write on the evolutionary structure of the LINUX operating system. Topics of discussion could…
A: Like Microsoft Windows, Apple Mac OS X, and Apple iOS, LINUX is an operating system. It belongs to…
Q: 1. Calculate average wait time and average completion time for the following processes using time…
A: Solution: Given,
Q: Consider the set of F of the following functional dependencies on relation R(A, B, C, D, E): AB C…
A:
Q: Design a roulette wheel which allows the user to enter bets on multiple numbers. Allow the user to…
A: “Since you have posted multiple questions, we will provide the solution only to the first question…
Q: Cadence1 is an archaeologist who is currently well-known for exploring the deepest crypts and tombs…
A: def getQuadrant(x, y): if x >= 0 and y >= 0: # first quadrant return 1 if x…
Q: Write a function to output a pyramid like this
A: Answer is given below in C++
Q: Consider a router that interconnects three subnets: A, B, and C. Suppose all of the interfaces in…
A: To satisfy the constraints of the problem, the network prefixes for the three subnets need to have…
Q: MATA THEORY, I'LL DEFINITELY UPVOTE IF YOUR SOLUTION IS CORRECT!!! Use pumping lemma to show that…
A: Given language : L = {ambm+1cm}
Q: Write a program that implements the FIFO and LRU page-replacement algorithms presented in this…
A: LRU and FIFO FIFO means First In, First Out, i.e., consider (in this case delete) elements…
Q: Prove the theorem: The Hungarian Algorithm finds a maximum weight mathcing and a minimum cost cover
A: Given: Statement: "The Hungarian algorithm finds a maximum weight matching and a minimum cost…
Q: What would be the Big O notation for this pseudocode and the total time cost? (I made it for a…
A: The correct answer for the above mentioned question is given in the following steps for your…
Q: According to us, Flynn's taxonomy has to be expanded by one tier. Do these machines have any…
A: Dear Student, The answer to your question is given below -
Q: The company is organized into DEPARTMENTs. Each department has a name, number and an employee who…
A: Relationship between Department and Employee is 1:M since department can have many employees but an…
Q: A quadratic formula is defined as a function written in the following format: f (x) ax²+bx+c From…
A: Step-1: StartStep-2: Declare variale a, b ,c and take input from the userStep-3: Declare variable…
Q: Match the structures below with the kinds of languages that they are able to recognize. Not all…
A: In the Theory of computation, lots of languages are available there are various types, and it is…
Q: a) Find keys d and e for the RSA cryptosystem where p=5, q=3 b) Encrypt the following plaintext BA…
A:
Q: uestion 14 papa .in linux/unix The file /usr/share/dict/words contains a list of "dictionary"…
A: The solution is given in the below step with explanation
Q: Given below is a for loop. Write an equivalent while loop that gives the same output.…
A: Introduction: Instead of following the while keyword with a condition, we just write the truth value…
Q: F. What are different activities of Architecture activities, define abst architecture.
A: The process of design include giving a thing its appearance and making sure it serves its intended…
Q: For integer n I let P(n) be the predicate that 9" CEZ. = 4c for some For the induction hypothesis,…
A: The following solution is
Q: The suggestion we're putting up here is to expand Flynn's taxonomy by one tier. Exactly what…
A: Dear Student, The answer to your question is given below -
Q: A case study demonstrating the students' accomplishment of project objectives is a crucial component…
A: Discussion: is the process of explaining and understanding facts or results by comparing them to…
Q: create logic design using pseudocode to clean your study table . 2 conditional statememt and 1 loop
A: As the programming language is not mentioned here, we are using PYTHON The Python code is given…
Q: Can you convert a LONG to LOB? If so, provide the syntax for doing so.
A: We need to discuss the convertion of LONG to LOB.
Q: Please share example ready-made RPG ambulance driver design game?
A: Answer to the following question Emergency Dispatch: The Ambulance Driver Game: in this game,…
Step by step
Solved in 4 steps with 5 images
- 1. Write a pyrhon program that prints out a classic hangman stick figure. The program should ask the user to enter a number from 1-6 and the corresponding hangman should be printed. The value the user inputs corresponds to the number of incorrect guesses in a real hangman game and so the completeness of the hangman will correspond to the number of ‘incorrect guesses’ inputted by the user (e.g., if the user enters 1, then only the head of the hangman will be printed; full example below). Example:Enter a number from 1-6: 1O Enter a number from 1-6: 2O|Enter a number from 1-6: 3O\||Enter a number from 1-6: 4O\|/|Enter a number from 1-6: 5O\|/|/Enter a number from 1-6: 6O\|/|/ \ 2. Modify your program from problem 1 so that the user input is checked to be a validsingle digit (1-6) before printing the corresponding hangman. If the input is not valid, theninstead of a hangman the following message should be printed “Invalid input: you must enter asingle number from 1-6.” Example:Enter a…You have been asked to write a program to play rock-paper-scissors. Your program will ask the user to input a number 0, 1, or 2 to denote rock, paper, and scissors respectively. Your program will then randomly generate a number 0, 1, or 2 to denote the computer’s hand. The rules for the game are: •A scissor can cut paper. •A rock can knock a scissor. •A piece of paper can wrap a rock. Let the game run continuously until either the user or the computer wins 3 times, displaying the outcome of each hand. At the end of the game, display a message indicating whether the user or the computer wins Helpful Hint: import random player2= random.randint(0, 2)Write a program that reads from the user a character ('q' or 'c'). If the character is 'c', the program reads from the user the radius rof a circle and prints its area. • If the user enters 'q', the program asks the user to enter the length and width of a quadrilateral. We assume the quadrilateral is either a square or rectangle. You should print if the quadrilateral is square or rectangle. • Otherwise, it prints "Wrong character" PS: Use the following formulas: area of circle=3.14*r Sample Run1: Enter a character (q or c): q Enter the Length and Width: 80 150 |It is a rectangle Sample Run2: Enter a character (q or c): q Enter the Length and Width: 80 80 It is a square Sample Run3: Enter a character (q or c): c Enter the radius: 2 The area of the circle is 12.56 Sample Run4: Enter a character (q or c): d Wrong character
- 1. For this problem, you are going to design a game for the children to teach them about numbers. You are going to take numbers as input from the user as long as he has not entered an even number. If enters odd number, ask him again to give input. When he enters an even number, print that the number is even, and you have won. The program should include the following specifications: É) This will go on, until the user gives an even number input F) When you find an even number, print, "You win! is an even number"Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönderUSE PYTHON A small shop sells 280 different items. Each item is identified by a 3 – digit code. All items that start with a zero (0) are cards, All items that start with a one (1) are sweets, All items that start with a two (2) are stationery and All items that start with a three (3) are toys. Write a program which inputs the 3 – digit code for all 280 items and outputs the number of cards, sweets, stationery and toys.
- Python Write a program that receives a number from a user and checks if it's float or integer.In case of being float, print for the user that his/her number is float with integer part andfractional part. In case of being integer, print to the user that his/her number is aninteger and odd/even numbeRIn Python Write a program that computes the fuel efficiency for a multi-leg journey. The program will first prompt for the starting odometer reading and then get information about a series of legs. For each leg, the user enters the current odometer reading and the amount of gas used (separated by a space). The user signals the end of the trip with a blank line. The program should print the miles per gallon achieved on each leg and the total MPG for the tripWrite a C# program that plays a guessing game with the user. Your program should select a random number between 1 and 50 and then let the user try to guess it. The program should continue asking the user for a number until he guesses correctly. (See below for some tips on random numbers). CHALLENGE #1: Modify your program so that it only allows the user 10 guesses, and then declares them to be an inadequate guesser if they haven’t gotten it correct. Your program should output the random number chosen. CHALLENGE #2: Modify your program so that after they guess a number (or get declared inadequate, if you do Challenge #1) that it asks them if they want to play again, and responds accordingly.
- Write a C# program that plays a guessing game with the user. Your program should select a random number between 1 and 50 and then let the user try to guess it. The program should continue asking the user for a number until he guesses correctly. (See below for some tips on random numbers). CHALLENGE #1: Modify your program so that it only allows the user 10 guesses, and then declares them to be an inadequate guesser if they haven’t gotten it correct. Your program should output the random number chosen. CHALLENGE #2: Modify your program so that after they guess a number (or get declared inadequate, if you do Challenge #1) that it asks them if they want to play again, and responds accordingly. Some Random Number Generation HintsRandom rndNumber = new Random();Console.WriteLine(rndNumber.Next()); //random integerConsole.WriteLine(rndNumber.Next(101)); //random integer between 0 and 100Console.WriteLine(rndNumber.Next(10, 43)); //random integer between 10 and…Control structures: In Java only please. Output the position of the largest number and the largest number in the squence a0, a1, a2....ak. For example, the largest number of the squence is 75, 226, 113, 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2, 1 is 340, and it's position is 4. Test your program for the following values of x: 75, 111, 678, 732, 873, 2048, and 65535. Thank youPart 1: Complete the survey. Part 2: Peek-a-boo is a fun game that little kids like to play. To simulate this game on the computer, write a program that will generate a random number between 1 and 4. Then, will print to the screen the animal name associated to that number. The animal names used will be: pig when a 1 is generated cow when a 2 is generated chicken when a 3 is generated horse when a 4 is generated If your program generates a 3, the output will be: chicken The player will then enter a 1 if they would like to play again or anything else to exit the program. If the player enters "1 1 1 0", the output will be: horse chicken cow horse For coding simplicity, follow each output animal by a space, even the last one. Hint: To make testing easier, seed your random number generator with 0.