Q6: Write a program to find and print the value of (f) from the following cquations for Fourteen known value of (U, 0 and Q). (U 0+15) / 62 f= (U'-0U) / 2 P=2 (U 0) +(0²-18) q-3 (U+0)/12 other wise
Q: Example: (H.W) Given a quadratic equation as follows: ax2 + bx + c = 0 if b*b-4*a*c_is greater than…
A: ! ---------------------------------------------------! Solve Ax^2 + Bx + C = 0 given B*B-4*A*C…
Q: Q1/ Write program to find temperature (W) that found from T= 5S°+2S+3 T= 2S3+3S?+5 at S100 Where…
A: #include <stdio.h> int main(){ //printf("Hello World"); int T,S,W,K;…
Q: Complete the following program that finds which of the time points comes last. The time is expressea…
A: correct statements are: time1="12:00"time2="00:55"hh1,mm1 = time1.split(":")hh2,mm2 =…
Q: Q#1: Write a program that prints the numbers from 1 to 1000 On the same line it should also print…
A: Program plan: Create a function name printSquare() loop from i=1 to 1000 print(str(i)+". Squared…
Q: Two words are anagrams of each other if they contain the same letters in them. So left is an anagram…
A: The solution to the given problem is below.
Q: Q4: Write a program in C++ Lang. to enter 30 random integer numbers , then print 1- Even numbers. 2-…
A: In the C++ program, include the necessary header files and then create the main() method to perform…
Q: Q2:::write a program that computes ,prints and plots A=√X, B-log X; C-In X; D=cx; E-3X; F=X7 Where X…
A: x=1:20 A=sqrt(x) plot(x,A)
Q: A factorial of N is defined as 1 if N is O or 1, and 1*2**N if N is a non-negative integer. Write a…
A: note:- only one program will be solved if they are not linked . Also mention programming language…
Q: Homework-4 Write a program read x value then compute S value from the following series: 1 (X – 1y +…
A: Note: Answering in python as no language is specified. Input to the Program : Four different values…
Q: Write a program called StudentTable that prints the below table. Use only print() orprintf(). DO NOT…
A: The "print()" and "printf()" function are available in C language and "println()" function is only…
Q: 1. Write a program to find the square of two numbers 10, -4. 2. Write a program to find the square…
A: 1. Sample Response: #Python3 program#function to print teh square of 10 and -4def printSquare():…
Q: Square of 13 is 169. 31, which is a reverse of 13 has a square 961. Here are few numbers which have…
A: // Following C Program will give required Output #include <stdio.h>int reverse(int n){…
Q: Write a program using a codeblock that consists of the following algorithm: num1 =4, num2= 4* 5-11,…
A: <!doctype html><html><head><title>Add Two…
Q: Q2/ Write a program that prints the block letter “B" in grid of stars like this: ****** * * ****** *…
A: First, middle, last lines have all *'s whereas in other lines, line starts and ends with *
Q: Write a program that prompts the user to enter a nonnegative integer and outputs the factorial of…
A: #include<iostream> using namespace std; int main(){ int number; cout << "Enter a…
Q: Excercise 30 defines the number e and exerecise 31 shows how to approximate the value of e using a…
A: Since no programming language is mentioned. I am attempting this in python. if you need it in any…
Q: A perfect number is a positive integer that is equal to the sum of its positive divi- sors except…
A: code:- function output = perfectNumbers(n)output = zeros(1,n);for i = 1:ntest = 1:i-1;if…
Q: Accept two integers and determine of the values are equal, if the values are equal print” EQUAL…
A: Introduction of Program: The C++ program takes two integers as input from the user and if both…
Q: Q2) Write a QBASIC program to compute the volume of cube, right circular cone, sphere depending on…
A: Code: Dim V as DoubleDim op as Integer PRINT "1. Compute the volume of cube"PRINT "2. Compute the…
Q: Complete the following program that collects an input word from the keyboard and finds if the word…
A: According to the asked question, the solution is given below with a proper explanation.
Q: S Q T S Q T (+) P QR S The problem asks to replace each letter with a number between 0 to 9 so that…
A: Given that, SQT (+) SQT = PQRS By adding 2 same three digit numbers, the value must be a…
Q: A positive whole number n > 2 is prime if no number between 2 and n (inclusive) evenly divides n.…
A: import mathn=int(input("Enter n value: "))count=0for i in range(2,int(math.sqrt(n))): if n%i==0:…
Q: Exercise 30 defines the number e and Exercise 31 shows how to approximate the value of e using a…
A: Since no programming language is mentioned. I am attempting this in python. if you need it in any…
Q: Q/ Write a program that finds the sum of the odd numbers and the sum of the even numbers among the…
A: I give the code in Python along with output and code screenshot
Q: We are given 5 integer numbers. Write a program that checks if the sum of some subset of them is 0.…
A: - We need to highlight the code for subset.
Q: A positive integer is called a perfect number if it is equal to the sum of all of its positive…
A: program code: import java.util.*;public class Main { public static void main(String[] args) {…
Q: Q29) Consider you have a list of 20 exam scores. Write a computer program that calculates the…
A: #Code in MATLAB: clear; a=[73, 91, 37, 81, 63, 66, 50, 90, 75, 43, 88, 80, 79, 69, 26, 82, 89, 99,…
Q: A perfect number is a positive integer that is equal to the sum of its positive divi- sors except…
A: Answer: % Create perfectNum() function function myNum-perfectNum(num) %num=10000 if you want four…
Q: 6- Write a program to read three numbers A,B,C then find whether A,B,C can form the sides of a…
A: Note: As no programming language is mentioned, therefore answering the given question in python.…
Q: A prime number is called a Mersenne prime if it can be writtenin the form 2 p - 1 for some positive…
A: Since the programming language is not mentioned, assuming the programming language to be C language.
Q: Write a program called StudentTable that prints the below table. Use only print() or printf(). DO…
A: Code: #include<stdio.h>int main() { char h[4][50]={"Name","Lab","Bonus","Total"}; char…
Q: Q4 write a program that accepts a day, month and year then calculate the day of year corresponding…
A: Given requirement, Write a program that accepts a day, month and year then calculate the day of the…
Q: 3.Use a Python string method for each of these: - determine if a string cost contains only numbers.…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: Complete the following program that collects an input word from the keyboard and finds if the word…
A: Solution Code word = input("enter")is_palindrome = Truei=-1for j in range(len(word)): if word[j]…
Q: Q17: Given that A and B are real variables with values 1.5, and 2.5 respectively, and C is integer…
A: 17. ) given, A = 1.5 B = 2.5 C = 3. so, NOT( A < 0 ) AND ( B/C <= 0 ) = NOT( 1.5…
Q: Complete the following program that finds which of the time points comes last. The time is expressed…
A: The answer is given below according to the sequence.
Q: Q2) Write a program to read a group of numbers between 1 to 100, then find the sum of the even…
A: PROGRAM CODE: #include <stdio.h> void main(){ int i, num, odd_sum = 0, even_sum = 0;…
Q: Q2) Write a program to read a group of numbers between 1 to 100, then find the sum of the even…
A: "Since you have not mention any programming language, so we will write our program in C++ language."…
Q: Modify the program to also print the powers of 2 for 2^20 and 2^30. And label 2^10, 2^20, 2^30 as K,…
A: Code : #include <stdio.h> #include <math.h> //Main function int main() { int i=0,…
Q: Q5: Ask the user to enter five capital letters (A..Z), and check if the letters are in an ascending…
A: According to the provided information: We need to create a program that will take five capital…
Q: Complete the following program that finds which of the time points comes first. The time is…
A: (1 ) in if condition it will print that time1 comes first means hours of time1 must be less then…
Q: A perfect number is a positive integer that is equal to the sum of its positive divi- sors except…
A: Answer :
Q: A perfect number is a positive integer that is equal to the sum of its positive divi- sors except…
A: Required:
Q: A right triangle can have sides that are all integers. The set of three integer values for the sides…
A: The complete code is given in next step along with comments
Q: 6- Write a program to read three numbers A,B,C then find whether A,B,C can form the sides of a…
A: Required: write a program to check if a triangle is valid or not and if valid then check if it is…
Q: Complete the following program that collects an input word from the keyboard and finds if the word…
A: PROGRAM CODE: word = input("Enter a word: ") // take the word from the…
Q: Create a c++ langauge that ask the user to enter a name (one word only) and then print the name in…
A: Code: #include <iostream>#include <bits/stdc++.h>using namespace std; int main(){…
Q: Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers…
A: Program: // Import the required packagesimport java.util.Scanner;import java.lang.String;// Class…
Q: Q2- Write a program to read a number (n). Then print all numbers from 0 to n that are not equal to 1…
A: #Note no programming is mentioned so i was used python programming language for i in…
Q: Question: 2 Write a program using nested loop structures that displays the following ou tput. 00 01…
A: #Logic to develop code Let we have two variable i and j. variable i will print rows and variable j…
Step by step
Solved in 4 steps with 2 images
- Modify the program to also print the powers of 2 for 2^20 and 2^30. And label 2^10, 2^20, 2^30 as K, M, G? Such as “2^10 = 1024 or K” Program : #include <stdio.h> #include <math.h> int main() { int i=0 ,j=0; int A[10] ; while(i<=10) { A[i] = pow(2,i); } while(j<=10) { printf(" 2^%d =%d \n ", j , A[j] ); } return 0 ; }Write a NumPy program to count the number of days of a given month for the given years import numpy as npprint("Number of days, February, 2020: ")print() #TO DO -- Complete the Codeprint("Number of days, February, 2021: ")print() #TO DO -- Complete the Codeprint("Number of days, February, 2022: ")print() #TO DO -- Complete the CodeWrite a program that randomly generates an integer between 1and 12 and displays the English month names January, February, . . . , Decemberfor the numbers 1, 2, . . . , 12, accordingly.
- Write a program that prints all numbers between 1 and 100 that are divisible byboth 5 and 7.Example 6-16 shows how to write a program to factor a polynomial of the form x² + bx + c, where b and c are integers. Modify the program so that it can also factor polynomials of the form ax2 + bx + c , where a, b, and c are integers. Note that the polynomial _ - 2x² - 3x + 2_ can be factored as: _ - 2x² - 3x + 2 = (-2x + 1)(x + 2) = - (2x - 1)(x + 2)_.Write a program that generates 1,000 lowercase letters randomly, counts the occurrence of each letter, and displays a histogram for the occurrences, as shown in Figure 10.16a.
- Write a program that displays every integer between 1 and 100 that is divisible by 5 or 7, but not both. Write it using While and for.The programming language is C++, write a program for each items base on the given statement. 1. Accept two integers and determine of the values are equal, if thevalues are equal print” EQUAL NUMBERS” , otherwise print the highernumber. 2. Create a program to check whether the input number is a positive ornegative. Consider 0 as positive number.1. a Write a regular expression for the set of binary strings where each string has at least one pair of consecutive zeros. b. write the regular expression for the following, where sigma = (a,b): i. string of length at least 2 ii. string of length at most 2 iii. all string starting with a and ending with b iv. Even length Strings
- Write a program that reads in two integers and determines and prints whetherthe first is a multiple of the second. [Hint: Use the remainder operator.]This Code print the first occurrences of x, Modify the code to print the last occurrences of x and print how many times it exists? ( with explanation for each line if possible) many thanks.Q19: Write a program to read a set of (5) real no.s and find out thesum and average of them.