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
Nitella [24]
3 years ago
14

4.3 mini programs AP computer science

Computers and Technology
1 answer:
allochka39001 [22]3 years ago
8 0

1.

name = input("Enter your name: ")

num1 = int(input("Hello "+name+ ", enter an integer: "))

num2 = int(input(name+", enter another integer: "))

try:

   if num1 % num2 == 0:

       print("The first number is divisible by the second number")

   else:

       print("The first number is not divisible by the second number")

except ZeroDivisionError:

   print("The first number is not divisible by the second number")

try:

   if num2 % num1 == 0:

       print("The second number is divisible by the first number")

   else:

       print("The second number is not divisible by the first number")

except ZeroDivisionError:

   print("The second number is not divisible by the first number")

2.

import random, math

num1 = float(input("Enter a small decimal number: "))

num2 = float(input("Enter a large decimal number: "))

r = round(random.uniform(num1, num2), 2)

print("The volume of a sphere with radius " + str(r) + " is " + str(round(((4 / 3) * math.pi * (r ** 3)), 2)))

I hope this helps!

You might be interested in
When Clara accesses the programs and documents on her computer by way of icons, she is said to be employing
zzz [600]
The correct answer is graphical user interface.
4 0
3 years ago
Draw the hierarchy chart and then plan the logic for a program that calculates a person’s body mass index (BMI).
dusya [7]

Explanation:

I have attached the answer as an image. I can't upload the file as it requires a licensed product and I only used demo version. I can provide the file too if you can give me your vlsig file required to use full software. However, If you just copy along the images on your Visual Studio, you will easily create the files yourself. Answer is provided for both scenarios as part A and part B, one which stops after 1 iteration and the one which loops until 0 height is given.

8 0
3 years ago
"En la opción
Katyanochek1 [597]
Answer: I think email

Explanation: not rlly sure tho..
5 0
2 years ago
Digital signatures are as legally acceptable as written signatures.
Leto [7]

Answer:

First point and the last point are the correct answer to the given question .

Explanation:

The main objective of the digital signature is to ensure the quality of the document or the message was not changed during the transfer of message in the network.

Following are the advantages of the digital signature

  • As compare to the electronic signature the digital signature is more secure then that of.
  • The signer's signature is seen on the digital signatures as the physical proof.
  • Global recognition, and the compliance with the law.

All the other options are incorrect they are not advantage of the digital signature .

4 0
3 years ago
What is <html>
ipn [44]

the opening tag for an HTML document

8 0
3 years ago
Read 2 more answers
Other questions:
  • If your vehicle catches fire while you are driving, you should:
    5·2 answers
  • Please help
    14·1 answer
  • Which of the following menu commands would you select to make a copy of an open file and rename it?
    15·1 answer
  • You can avoid culture shock by ____________.
    10·2 answers
  • Loops are frequently used to ____; that is, to make sure it is meaningful and useful.
    12·1 answer
  • If a client is found _________ the NAP will attempt to make it _______. Group of answer choices A. non-compliant, compliant B. s
    13·2 answers
  • What is an "immediate preemptive scheduler"?
    15·1 answer
  • Computer privacy typically occurs when which of the following is violated?
    6·1 answer
  • A carver begins work on the following block of granite that weighs 2700 g. What is the density of the granite?
    13·1 answer
  • What is the volume of a rectangular prism with a length of 812 centimeters, width of 913 centimeters, and a height of 1225 centi
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!