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
lana [24]
2 years ago
13

A. Get a value for x from the user.

Computers and Technology
1 answer:
Gennadij [26K]2 years ago
7 0

Program (Python):-

\tt x=int(input("Enter\:your\:number:"))

\tt if \:x

\tt \qquad print("You\:have\:made\: mistake")

\tt else:

\qquad\tt print("Well\:done")

\tt cuberoot=x**1/3

\tt print("Cube\:root=",cuberoot)

\tt for\:i\:in\:range(x):

\qquad\tt print(x)

Sample output

Enter your number:-8

You have made mistake

Cuberoot=-2

-8

-8

-8

-8

-8

-8

-8

-8

You might be interested in
In this assignment we are going to practice reading from a file and writing the results of your program into a file. We are goin
zhenek [66]

Answer:

In Python:

import os.path

from os import path

fname = input("Filename: ")

if path.exists(fname):

with open(fname) as file_in:

 lines = []

 for line in file_in:

  lines.append(line.rstrip('\n'))

f = open("stat.txt","r+")

f.truncate(0)

f = open("stat.txt", "a")

f.write("Names\tTotal\tSubjects\tAverage\n")

for i in range(len(lines)):

 rowsum = 0; count = 0

 nm = lines[i].split()

 for j in nm:

  if (j.isdecimal()):

   count+=1

   rowsum+=int(j)

 average = rowsum/count

 f.write(nm[0]+"\t %3d\t %2d\t\t %.2f\n" % (rowsum, count, average))

f.close()

else:

print("File does not exist")

Explanation:

See attachment for explanation where comments were used to explain each line

Download txt
6 0
3 years ago
17. Write a SELECT query for the palateE4 database that produces a result grid listing paintName, and a count of the occurrences
GaryK [48]

Answer:

SELECT paintname, COUNT(paintname) as count_paintname

FROM paint

GROUP BY paintname HAVING COUNT(paintname) > 2

ORDER BY paintname

Explanation:

The structured query language or SQL statement returns two columns of paintname and the count of the distinct paint names in the paint table with rows of grouped paint names greater than two and in the ascending order of the names.

4 0
3 years ago
Which tab of the ribbon includes the links group for creating hyperlinks or internal references?
Deffense [45]
The correct answer is D.File
5 0
3 years ago
Read 2 more answers
(Type the correct answer in the box.)
mihalych1998 [28]

1. If in MS Access, Click on Query design, select the required Table.

 In Field select required field, in this case Select [Name of Plants]. Click on Order and set it as Ascending / Descending.

2. If you want to write a Query that it will look like this

SELECT MedicinalPlants.Name of the plantsFROM MedicinalPlantsORDER BY MedicinalPlants.Name of the Plants;

Read more on Brainly.com - brainly.com/question/3433328#readmore

4 0
3 years ago
Read 2 more answers
What do rocket scientists mean when they say, "forces come in pairs?"
zhenek [66]
According to Newton's third law, for every action force there is an equal (in size) and opposite (in direction) reaction force.
6 0
3 years ago
Other questions:
  • Write a program that asks the user for the speed of a vehicle (in miles per hour) and how many hours it has traveled. It should
    5·1 answer
  • True are fulse A piece of information that is considered common knowledge does not need a citation
    5·2 answers
  • Who should get the copyright credit for a piece of computer art: the CPU, the software, or the programmer? Explain your reasonin
    7·1 answer
  • How can supply and demand for different careers affect job stability and income?
    6·1 answer
  • A ____________________ can be used to hierarchically represent a classification for a given set of objects or documents. A. taxo
    10·1 answer
  • What is the use of html in websites
    15·2 answers
  • As a photographer, what will be the driving force behind everything that you produce?
    13·1 answer
  • You would like to know how many cells contain data. Which function should you use?
    11·1 answer
  • describe a situation in which peer pressure could cause a serious problem for safe driving, and how you could resist the peer pr
    8·2 answers
  • To use
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!