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
Anuta_ua [19.1K]
3 years ago
14

Write Python algebraic expressions corresponding to the following statements: (a) The sum of the first five positive integers (b

) The average age of Sara (age 23), Mark (age 19), and Fatima (age 31) (c) The number of times 73 goes into 403 (d) The remainder when 403 is divided by 73 (e) 2 to the 10th power (f) The absolute value of the difference between Sara's height (54 inches) and Mark's height (57 inches) (g) The lowest price among the following prices: $34.99, $29.95, and $31.50
Computers and Technology
1 answer:
lbvjy [14]3 years ago
5 0

Answer:

#part a

#sum of first 5 positive number

Sum=5*(5+1)/2

print("sum of first 5 positive integer is: ",Sum)

#part b

# declare age of all

Sara_age=23

Mark_age=19

Fatima_age=31

ave_age=(Sara_age+Mark_age+Fatima_age)/3

print("average age of Sara,mark and Fatima is: ",ave_age)

#part c

#find number of times

no_of_times=int(403/73)

print(" number of times when 73 goes into 403 is: ",no_of_times)

#part d

#find remainder

rem=403%73

print("when 403 is divided by 73 then remainder  is: ",rem)

#part e

#calculate 2 to pawer 10

two_pow=2**10

print("2 to power  10 is: ",two_pow)

#part f

#declare height of both

sara_h=54

mark_h=57

diff_h=abs(sara_h-mark_h)

print("The absolute difference between height of Sara and Mark is: ",diff_h)

#part g

#find the minimum among three

print("lowest price among the three($34.99,$29.95,$31.50) is: $",min(34.99,29.95,31.50))

Explanation:

In part a, sum of first 5 positive number is calculated as 5*(5+1)/2.In part b, add the age of three and divide it  by 3. In part c, use "/" to find number of times 73 goes into 403.In part d, use "%" to find remainder when 403 is divide by 73.In part e, 2 to the 10th power is calculated as 2**10.In part f, use abs() to find the absolute  difference.In part g, min() function is used to find lowest among the 3 prices.

Output:

sum of first 5 positive integer is:  15.0                                                                                  

average age of Sara,mark and Fatima is:  24.333333333333332                                                                

number of times when 73 goes into 403 is:  5                                                                              

when 403 is divided by 73 then remainder  is:  38                                                                          

2 to power  10 is:  1024                                                                                                  

The absolute difference between height of Sara and Mark is:  3                                                            

lowest price among the three($34.99,$29.95,$31.50) is: $ 29.95

You might be interested in
HELP!!!<br> THIS HAPPENS EVERY TIME
Lelu [443]
Idek but hope u figure it out!
4 0
3 years ago
Read 2 more answers
Timur was making a presentation regarding how attackers break passwords. His presentation demonstrated the attack technique that
kakasveta [241]

Answer:

The answer of the following question is Brute force attack .

Explanation:

A brute force attack is the error and trial method that is used by an application program to decode the encrypted data like passwords or the Data Encryption Standard (DES) keys, which through an exhaustive effort (by using brute force) rather than the employing an intellectual strategies.

7 0
2 years ago
ASAP help me I dont have enough time
umka21 [38]

Answer:third stage of parent-infant attachment

Explanation:

7 0
1 year ago
______ data is data that has not been processed for use. Multiple choice question. Raw Fast Decision Source
Illusion [34]

Answer: Raw Data

Explanation:

Raw data (sometimes called source data, atomic data or primary data) is data that has not been processed for use.

6 0
1 year ago
a ____ is a duplicate of a file, program, or disk that you can use in case the original is lost, damaged, or destroyed.
AleksAgata [21]
A backup is a duplicate of the file, program or disk that you can use in case the original is lost, damaged or destroyed.
3 0
3 years ago
Other questions:
  • Use NumPy to recreate your answer to Question 1b. The input parameters will both be python lists, so you will need to convert th
    8·1 answer
  • Insecurely attached infants who are left my their mothers in an unfamiliar setting often will
    14·1 answer
  • How many bit does four gigabyte has
    8·2 answers
  • Drag each tile to the correct box.
    8·2 answers
  • You have purchased a printer that has the capability to print in duplex mode so that users can print on both sides of a sheet of
    7·1 answer
  • A power supply unit for a computer converts:
    6·1 answer
  • Write a Java class with the following methods: getArray(int numStrings) is an instance method that takes command line input (use
    11·1 answer
  • Computer simulations were first developed during __________<br> as a part of the _____________
    5·1 answer
  • imagine that you wanted to write a program that asks the user to enter in 5 grade values. the user may or may not enter valid gr
    12·1 answer
  • How does 5G technology enhance the Internet of Things (ioT) ?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!