If (y<-2):
If (x<y+z):
Print(“ah-ha”)
Elif(x>= y+z):
Print(“oh, no!”)
What is printed by the code below? If (y<-2): If (x<y+z): Print(“ah-ha”) Elif(x>=...
what will be printed when you run below code in python? age=6 age=(age**2)//2 print(age) if (age >25) print("You will pay $120 per month") print("check date:") elif(age >=16) print("You will pay $90 per month") else: print("You will pay $50") print("Check payment due date") print(" Your payment is due by Oct 2019")
What will be printed for the code below: age = 15 if (age < 13) { print ("child") } else if (age >= 13 & age <=19) { print ("teenager") } else { print ("adult") } What will be the output of the code below: for(i in 1:100) { if(i <= 20){ print (i) }
What will be printed by the code below What will be printed by the code below #include <iostream> using namespace std; class A { public: A() {cout << "+1";} ~A() {cout << "-1";} }; class B: public A { public: B() {cout << "+2";} ~B() {cout << "-2";} }; class C: public B { publc: C() {cout << "+3";} ~C() {cout << "-3";} }; int main() { A a1; B b1; A *a2 = new A; B *b2; = new...
Help, I just cannot figure out how to make this code print "x cannot be divided by zero" after i set the y intercept value to 0 and i want the code to print "x cannot be divided by zero" everytime i put a zero for y value. Here is my code below: (PYTHON) x_intercept = float(input("Enter x: ")) y_intercept = float(input("Enter y: ")) operation_msg = input("Enter operation (plus, power, divide): ") add_formula = x_intercept + y_intercept add_final = float(add_formula)...
Using Python The variables x and y refer to numbers. Write a code segment that prompts the user for an arithmetic operator and prints the value obtained by applying that operator to x and y. Using the following information run an example in Python Idle op = input("Enter an arithmetic operator: ") if op == "+": print(x + y) elif op == "-": print(x – y) elif op == "*": print(x * y) elif op == "/":...
What will be printed by the following segment of code: int z = 3 ; System.out.println("The first value of z is: " + z) ; while (z > 0) { z++ ; System.out.println("z is now: " + z) ; } System.out.println("At last, z is: " + z) ;
What value is printed out from the code below? public void square(double x) { double x = x * x; } : double val = 10; square(val); System.out.println(val);
in python, What is the outcome? :x= -1 y= -2 z= -3 def h( x, y=2, z=3); print x,y,z h(1, z=4 )
. Given x-0, y = 0 and z-1, what is the value of x, y, z after executing the following code? if(x) If(y) Z-3 else Z- 2
Please answer the questions below about the following code segment in C: int x, y, z int *ix, *iy, *iz; char *c "Hello"; x10; ?- 20; z=30; iz = &z; x = z + *IZ; 200 t 30?130 2200; 1. What is the value of "ix? 2, What is the value of *iy? 3. What is the value of *iz? 4. What is the value of c[0]? 5. What is the value of c[strlen(c) - 1]?