Im getting the same output but I'm assuming I'm forgetting to incorporate the objective of evaluating in increments of 1 unit? How do I code that?
OUTPUT :
CODE :
import math
def f(x):
#If x<8, return sqrt(x)
if x<8:
return math.sqrt(x)
#Return square root of 8
return 8**0.5
#Loop from 0 to 10
for x in range(11):
#Print f(x) rounded to 3 decimal points
print('%.3f'%f(x))
Im getting the same output but I'm assuming I'm forgetting to incorporate the objective of evaluating...
i'm trouble getting my program to print this output and repeat until asked to quit the program Enter a telephone number using letterss (EXIT to quit): GET LOAN The corresponding telephone number is: 438-5626 Here's my code: #include <stdio.h> #include <string.h> char getNumber(char aC) { char c = ' '; switch (aC) { case 'A': case 'B': case 'C': c = '2'; break; case 'D': case 'E': case 'F': c = '3'; break; case 'G': case 'H': case 'I': c...
I'm getting errors that i can't figure out. I need help fixing them. particularly focus on the errors they are highlighted in bold on the list code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <ctype.h> #include "stack.h" #include "booleanEvaluation.h" #include "booleanWithError.h" /* evaluatePostfix * input: a postfix expression * output: T, F, or E * * Uses a stack to evaluates the postfix expression and returns the result as a string where "T" denotes true and "F" denotes...