1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alecsey [184]
3 years ago
10

4.12 LAB: Using math methods Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to

the power of z), the absolute value of y, and the square root of (xy to the power of z). Ex: If the input is:
Computers and Technology
1 answer:
Greeley [361]3 years ago
4 0

Answer:

The function is as follows:

import math

def func(x,y,z):

   print(math.pow(x, z))

   print(math.pow(x,math.pow(y, z)))

   print(math.fabs(y))

   print(math.sqrt(math.pow(x*y,z)))

Explanation:

This imports the math library

import math

This defines the function

def func(x,y,z):

Print the stated outputs as it is in the question

<em>    print(math.pow(x, z)) ---> x to power x</em>

<em>    print(math.pow(x,math.pow(y, z))) ---- x to power of y of z</em>

<em>    print(math.fabs(y)) ---- absolute of y</em>

<em>    print(math.sqrt(math.pow(x*y,z))) --- square root of xy power x</em>

<em />

You might be interested in
True or false a mirrorless camera has a pentaprism
inessss [21]

Answer:

No the pentaprism or pentamirror are both optical viewfinder viewing systems and are not part of the mirrorless camera. Some thing the pentaprism actually operates better than the electronic viewfinder of mirrorless cameras.

Explanation:

7 0
2 years ago
Read 2 more answers
Create a program with a script that calls the following functions: getinput, calculateGPA, createBor, and printResults. The prog
Licemer1 [7]

Answer:

The script is given below

Explanation:

%%driver

[grades , num_semester ] = getInput( ) ;

gpa = calculateGPA(grades , num_semester) ;

printResult( gpa) ;

createBar( num_semester , grades ) ;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [grades , no_semester] = getInput()

no_semester = input("How many semesters in college " );

for i = 1: no_semester

grades(i) = input( " Enter semester GPA ") ;

if( grades(i) > 4 && grades(i) < 0 )

disp( " Entered Grades are out Of Bounds ") ;

end

 

end

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function GPGA = calculateGPA(grades , no_semester )

sum = 0 ;

for i = 1 : no_semester

 

sum = sum + grades(i) ;

 

end

 

GPGA = sum/( no_semester);

 

 

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function bargraph = createBar( semester_num , grades )

 

bargraph = bar( grades, semester_num) ;

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function f = printResult( gpga )

 

fprintf( " Your GPGA is : %d \n " , gpga);

 

if( gpga >= 3 && gpga <=4 )

fprintf( " exception good work ") ;

 

end

if( gpga >= 2 && gpga <= 3)

fprintf( " You are average " ) ;

end

if( gpga >= 1 && gpga <= 2 )

fprintf( " you FAIL" ) ;

end

end

8 0
2 years ago
The part of the computer that provides access to the Internet is the
andrew11 [14]

Answer:

MODEM

Explanation:

5 0
2 years ago
Adam is using the software development life cycle to create a new game. He made an outline of what functionality the game will r
Olin [163]

Answer:

Write pseudocode and create a mock-up of how the game will work and look

Explanation:

Since in the question it is mentioned that Adam wants to develop a new game for this he made an outline with respect to game functions needed, time period, people who help him.

After that, he writes the pseudocode i.e a programming language and then develops a model i.e mock up that reflects the working of the game and its look so that he would get to know how much work is pending.

3 0
3 years ago
What is one difference between the Simple Gear Train with Same Size Gears and Simple Gear Train with Different Size Gears?
polet [3.4K]

Answer:

One difference between a Simple Gear train with Same Size Gears and Simple Gear Train with Different Size Gears is the that the number of rotations of both shafts in the Simple Gear Train with Same Size Gears is the same the number of rotations of both shafts in the simple Gear Train with Different Size Gears are different

Explanation:

A simple gear train is one in which each shaft has only one shaft, and the motion of one shaft in transmitted to the other when the gears are in contact

5 0
2 years ago
Other questions:
  • Does anyone have any social media message me
    14·1 answer
  • Write a program that will open the file random.txt and calculate and display the following: A. The number of numbers in the file
    12·1 answer
  • Which of the following is a category of social media?
    8·2 answers
  • Suppose x and y are int variables and ch is a char variable. Consider the following input: 5 28 36 What value (if any) is assign
    11·1 answer
  • The goal expressed in this definition states that data visualization is about ______ . 1. Interpreting 2. Perceiving 3. Facilita
    6·1 answer
  • In the cis configuration, the methyl groups are placed _____.
    8·2 answers
  • If you misspell a word in your Java program it may be true that I. the program will not compile II. the program may compile, but
    6·1 answer
  • How do u delete a post on brainly
    7·1 answer
  • How do you use switch board in the office​
    6·1 answer
  • HELP ME ⚠️‼️⚠️‼️ DUE IN EXACTLY 27 MINUTES
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!