Q3) Write a Python program to read input the length of the base(in cm) and height(in cm) of a triangle and print the area of the triangle in the output.
Q: b) Take input two strings each of length 5 and then swap the first character of both the strings…
A: To swap, Store the first string character in temp, then update first string character and then…
Q: 3. Write an Octave program to a. Read a complex number from the user b. Display its magnitude and…
A: Answer : Program :
Q: 2. Using the notation introduced in this section, write a regular expression that could be used to…
A: As you have posted multiple parts, we will solve the first three parts for you. As no language is…
Q: Consider a value as a=5 and b value as b=5 Write the output of below given program
A: #initialize a and ba=5;b=5; a=a+5; #add 5 to aa+=5; #add 5 to a b*=(a+b); #multiply b…
Q: Write a program to calculate the value and print f (y, x) and print the results according to a…
A: To calculate the value of f(x, y) we need to test the value of x and y using the if-else-if-else…
Q: 5. Write a program to print even numbers from 1 to 10, print every number in a separate line.
A: use loop to iterate from i=1 to 10. use if statement and mod operator to check if i%2==0…
Q: Q1/ Write a program that takes hours and minutes as input and outputs the total number of minutes (1…
A: "Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: 3. Write a program to calculate and print the area of a circle (area = PI *r * r) and its…
A: Initialize r Initialize pi Print Area(pi*r*r) Print Circumference(2*pi*r)
Q: Write a program that removes all non-alpha characters from the given input. Ex: If the input is:…
A: Step 1 The code is given in the below step;
Q: II. Draw the flowchart, create the code/C program and generate the output. 1. Compute the average…
A: Flowchart
Q: 5. Write a program in which the user enters the three angles of a quadrilateral and the program…
A: Write a program in the JAVA language in which the user enters the three angles of a quadrilateral…
Q: Q1/ Write a program to print even numbers from 11 to 100. Using For statement)
A: Note: Since no programming language is mentioned, the program has been provided in Java programming…
Q: 2. Write a Python program to find the x coordinate of the center of mass of a uniform rod of length…
A: Required:- Write a python program to find the x coordinate of the center of mass of a uniform rod of…
Q: 3. Write a Python program to input the values of 3 integers x, y, and, z from the user. Then print…
A: Given: Three integers x, y, and z taken as input from the user. Requirement: Write a Python program…
Q: Q1) Write a Python program to display the Output below: ********** ******** ****** ****…
A: The answer is given below:-
Q: - program to convert temperature from Fahrenheit to Celsius degree. Test Data Input a degree in…
A: Lets see the solution.
Q: Write a Python program to print all uppercase alphabets along with their respective ASCII values in…
A: Write a Python program to print all uppercase alphabets along with their respective ASCII values in…
Q: B: write a program to enter two numbers and print the largest number.
A: Introduction the question is about programing language of visual basic and here is the solution in…
Q: Q1\write an oop program to multiplying three integer numbers ?
A: Step-1: Start Step-2: Declare variable a, b, c and multi Step-3: Take input three numbers for a, b…
Q: Q1\write an oop program to multiplying * three integer numbers ?
A: Step-1: Start Step-2: Create a class Multiply Step-2.1: Declare three variable a, b and c Step-2.2:…
Q: iv) Write a Python program to input two integers t1, t2 from the user and then find the value of the…
A: Code : Output :
Q: Part1: Write a program to display the following output: Z Z X Z X V Z X V T Z X V T R
A: Considered the output in C code: #include<stdio.h> #include<conio.h> void main() { int…
Q: 11. Print the string "Hello World!" along with the quotes in the output using a program in Python…
A: Given: To write a python program to print string "Hello World!" along with quotes.
Q: Q8: Write C++ program to read an integer from 1 to 12, and print out the value of the corresponding…
A: C++ Code: #include <iostream> using namespace std; // here is the main function int main(){int…
Q: 5. Write a Python program to take input the year number and month number from the user and print the…
A: Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.
Q: iii) Write a Python program to input three integers a, b, and c (a<b<c) and find the sum of all the…
A: Write a Python program to input three integers a, b, and c (a<b<c) and find the sum of all the…
Q: 4. Write a program to compare your name with your surname. The output should state whether your name…
A: ALGORITHM:- 1. Take input from the user. 2. Compare the input using the inbuilt compare() function.…
Q: ii) Write a Python program to take input two integers x,y and print the value of x2 - y2 in the…
A: x = int(input("x: ")) #input x y = int(input("y: ")) # input y # calculate x2 - y2 out = x*x -…
Q: 3. Make a program to accept a reading in richter scale of an earthquake and display the extent of…
A: Given :
Q: 8. Write a Python program to read input three integers p, q, r, and print "True" if all the numbers…
A: Python program Note: Please make sure code indentations are correct while you copy (refer…
Q: blöi 10 Write C program to find and print the number of fraction digits in a real number. For…
A: Code With Explanation: //required header files#include <stdio.h>#include…
Q: Q1\ Write a program to convert temperatures from Fahrenheit to Celsius and Kelvin.
A: While doing programming in any programming language, you need to use various variables to store…
Q: B- Write a program to print the result of the following equation: ya3 + x5 With c++
A: I have given c++ code below.
Q: Write C program to input the weight in kilograms. Convert the total kilograms to grams and display.…
A: #include <stdio.h>int main() { double n1, n2; int kg; printf("\nEnter weight in kg:…
Q: Q1/answer A or B: A-Write a program to compute the drag force Fn (in Newton) When a body swims…
A: Hello student Greetings Hope you are doing great. Thank You!!!
Q: Q1: Write C++ program to print the negative numbers of three integer numbers. 02: Display the date…
A: Q1. Algorithm: 1. Start 2. Read 3 numbers a,b,c 3. If a>=0 set a=-a If b>=0 set b=-b If…
Q: 1. Write a program to input an amount R in Omani Rial (RO), and a character from the keyboard and…
A: ALGORITHM:- 1. Take input for Omani Rial input. 2. Take input for choice. 3. Calculate the result.…
Q: 3.1 Write a program to read input two integers x,y from the user and swap the numbers without using…
A: Write a program in PHP language to read input two integers x,y from the user and swap the numbers…
Q: 22: Write a Cr+ Program to read (x) and Compute square and čube of X, then sumation of square and…
A: Start Input value of x Calculate sum Calculate cube Display sum, cube, summation Stop
Q: Write a statement (or comment) to accomplish each of the following: d) Read three integers from the…
A: Answer: Code in c++ as no coding language is mentioned: #include <iostream> using namespace…
Q: Write C program to display the letter (A) in the second digit of 7-segments and it disappears in (3…
A: Here, we write a C program for AVR to display the letter (A) in the second digit of 7-segments and…
Q: Determine the output generated by the partial C code given. #include #include void main() { int a=9,…
A: C program: // Online C compiler to run C program online#include…
Q: Q5. A) Write a program to read Celsius temperature and convert it to Fahrenheit using the equation:…
A: ⦁ The given equation is C=(F-32) * 5/9⦁ We have to convert C to F i.e.,) celsius to fahrenheit⦁…
Q: 5: Write a NumPy program to calculate the mean of the number of steps of the first crossing time…
A: To calculate the mean of the numbers first we should add the numbers and divide with the number…
Q: complete the blank in below C++ program to display prime numbers between two intervals.
A: A prime number is a natural number greater than 1 that is not a product of two smaller natural…
Q: 2.2 Write a program to generate 10 random numbers in the range [-0.5,0.5] and print them in the…
A: Write a C++ program to generate 10 random numbers in the range [-0.5,0.5] and print them in the…
Step by step
Solved in 4 steps with 2 images
- ii) Write a Python program to input a string from the user and check if the string is a binary string or not. A binary string is a string that contains only O's and 1's. Input: 1010101 Output: true Input: 5018 Output: falsea.Write a python program that asks the user to enter two integer numbers and then perform addition,subtraction, multiplication, and division using these 2 numbers. Then display (print) the results. b. Write a python program that displays converts the binary numbers 100 and 110 to decimal anddisplay them. Then add the two numbers and display the result in decimal, binary, octal, andhexadecimal.d) Write a JAVA program to read input the length(in cm) of the side of a regular hexagon and print the area of the hexagon in the output.
- 4. Write a PYTHON program to read a Fahrenheit degree and convert it to Celsius degree using the conversion formula: 5 c° =(F- 32) %3DProblem: Write a Python code that prints a triangle of triangles using the "A" symbol, given height H. Assume that the input value is always positive. Use either loops or iterations. Šample Input: Sample Output: 1 A A ΔΔ 2 A A A ΔΔΔΔΔΔΔΔΔ Δ AAA AAAAA A A A AAA AAA AAA AAAAAAAAAAAAAA A A A A A AAA AAA AAA AAA AAA AAAAAAAAA AAAAAAe) Write a Python program to find the sum of all multiples of 7 in the range [100,300] and print the sum in the output.
- 1. Create a Python program to reverse the digits of a given number and add it to the original, if the sum is not a palindrome repeat this procedure. Note: A palindrome is a word, number, or other sequence of characters which reads the same backward as forward, such as madam. Example For the input 12345 + 54321 Expected output is 666661. Write a python program to find the sum of all even numbers from 0 to 10 2. Write a python program to read three numbers (a,b,c) and check how many numbers between 'a' and 'b' are divisible by 'c'2. Write a python program to read three numbers (a,b,c) and check how many numbers between 'a' and 'b' are divisible by 'c'
- Write a python program to take input three integers a,b,c from user and print the value of (a+b*c) in output.e) Write a Python program to read input three strings p,q,r from the user and print the string rqp in the output, where string rqp is formed by concatenating the strings p,q,r in the order r+q+p.2. Write a program that converts a hexadecimal digit into a decimal value. (The output of your program should be like the following but you should try different numbers.) Enter a hex digit: AB7C You must enter exactly one character Enter a hex digit: B The decimal value for hex digit 8 is 11 Enter a hex digit: 8 The decimal value for hex digit 8 is 8 Enter a hex digit: T T is an invalid input