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
crimeas [40]
3 years ago
12

A cubit is an ancient unit of length, roughly the distance between one’s fingers and elbow. The definition of one cubit is 18 in

ches. Write a program consisting of one script and one function. The script does the following: ▪ prompts the user for the number of cubits ▪ calls a function cubit2inch to convert this number to inches ▪ prints the result
Computers and Technology
1 answer:
kifflom [539]3 years ago
6 0

Answer:

  1. def cubit2inch(c):
  2.    inches = c * 18
  3.    print(inches)
  4. cubit = int(input("Enter number of cubits: "))
  5. cubit2inch(cubit)

Explanation:

The solution code is written in Python 3.

Firstly, write a function cubit2inch that takes one input parameter, c. In the function, apply the formula to convert the cubit to inches and print it (Line 2 - 3).

In the main program, we prompt user to input number of cubits and convert it to numerical and assign it to cubit variable (Line 5). Call the function to print the converted inches (Line 6).

You might be interested in
The numeric keys on the keyboard are sometimes called the ten keypad. true false
mr_godi [17]
The answer is true...
8 0
3 years ago
Read 2 more answers
1
raketka [301]

1

they were crafted in stained-glass art in religious buildings

2

puzzle games

3

motion-capture devices (e.g., Kinect, WiiMote

4

puzzle

simulation

5 0
3 years ago
Files and e-mail messages sent over the Internet are broken down into smaller pieces called _____.
Fynjy0 [20]
Files and email messages sent over the internet are broken down into smaller pieces called packets
6 0
3 years ago
The programming language that translates digital data into printer commands is known as
jolli1 [7]
The answer is C.) PostScript
8 0
3 years ago
Please help, will give brainliest!!! I need help with these coding questions, any help is appreciated
olchik [2.2K]

Answer:

class Foo:

   def F(self, n):

       if n == 1:

           return 1

       return self.F(n - 1) + 3 * n - 2

Explanation:

This should cover part a to this question. The thing I'm not sure on is they use the term "method" which in python technically means a class function...but then list one argument with the function call which makes me think it is possibly just supposed to be a regular function. Which would be the following snippet. It would depend on if you are using classes or not yet in your coding class.

def F(n):

   if n == 1:

       return 1

   return F(n - 1) + 3 * n - 2

Play around with it and look into python "lists" and "for loops" for part c. Part b I'm not sure what kind of example they want since I'm not in that class. Good luck!

8 0
2 years ago
Other questions:
  • Assume that you have an array of integers named arr. The following program segment is intended to sum arr [0]through arr[n−1], w
    7·1 answer
  • Why OSI is called open system?
    8·1 answer
  • Which phrase is a comparison operator for inserting a not equal to argument in an IF, COUNTIF or SUMIF function? <= <>
    9·1 answer
  • What is a screen tip
    6·1 answer
  • What is the interface in Java programming Language? Why do we need to use it?
    6·1 answer
  • What type of undocumented yet benign hidden feature launches after a special set of commands, key combinations, or mouse clicks?
    15·1 answer
  • The gene form of a trait is called a(n) ​
    10·1 answer
  • The right to make others do things is referred to as _________.
    14·2 answers
  • If you play gta and don't know the song ''Glamorous'' Then what do you even do when you play?
    6·2 answers
  • Alexa it is olewi.............................................
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!