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
Why does someone put 'human' at the end of their social media profile as a summary or description? I've seen this a lot online n
Vikki [24]
Becuase some profiles are bots or fake
6 0
3 years ago
Four examples of computer virus​
Nikitich [7]

Virus that infects files. Macro Virus is a virus that attaches itself to an executable application. This type of virus is commonly found in Microsoft Word or Excel programs.... Browser Hijacker.... Web Scripting Virus.

Good morning, I hope this helps, and if you don't mind, please mark me as brainliest ❤

4 0
3 years ago
80% OF QUESTIONS ARE ANSWERED IN UNDER 10 MINUTES why not mine
Lilit [14]

Which question do u need and plus some people just go for quick questions

6 0
3 years ago
Read 2 more answers
What is the most important for you to choose before you build a network?
olga nikolaevna [1]
Network media is most important
4 0
4 years ago
(a)Ms word is a isa word processing software ,(b)hub provides physical connection between all computers, State true or false​
8090 [49]

Answer:

true

Explanation:

true in answer in the question

8 0
3 years ago
Read 2 more answers
Other questions:
  • In the Remote Access Domain, if private data or confidential data is compromised remotely, you should set automatic blocking for
    5·1 answer
  • What error, if any, is in the following code?
    11·1 answer
  • Which kind of software allows users to draw pictures, shapes, and other graphical images with various on-screen tools such as a
    14·1 answer
  • You are planning trip to South America and and are worried about your devices with private keys being stolen. So you decide to s
    9·1 answer
  • Which statement about muzzleloaders is true? All muzzleloaders are rifles. All muzzleloaders have only one barrel. Muzzleloaders
    12·1 answer
  • What is a multipurpose network device?
    10·1 answer
  • Discuss how printing, publishing, and e-learning industries have transformed on evolved due to developments and advances the fie
    14·1 answer
  • Help me please I’m failing
    11·1 answer
  • "Rights and duties are two sides of the same coin." Explain with examples​
    5·1 answer
  • True or false: if you are adding your own css sheet, make sure your css file comes before the bootstrap css file.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!