Ask Question
18 October, 22:00

Exercises 2.12 Write Python expressions corresponding to these statements: (a) The sum of the first seven positive integers (b) The average age of Sara (age 65), Fatima (57), and Mark (age 45) (c) 2 to the 20th power (d) The number of times 61 goes into 4356 (e) The remainder when 4365 is divided by 61

+1
Answers (1)
  1. 19 October, 01:16
    0
    The python expressions are given in the explanation section

    The comments specifies each sub-question

    Explanation:

    #The sum of the first seven positive integers

    sum = 0

    for i in range (1,8):

    sum + =i

    print (sum)

    #The average age of Sara (age 65), Fatima (57), and Mark (age 45)

    Sara_Age = 65

    Fatimah_Age = 57

    Mark_Age = 45

    Average_Age = (Sara_Age+Fatimah_Age+Mark_Age) / 3

    print (Average_Age)

    # 2 to the 20th power

    num = pow (2,20)

    print (num)

    #The number of times 61 goes into 4356

    num_times = 4356/61

    print (num_times)

    #The remainder when 4365 is divided by 61

    remainder = 4365%61

    print (remainder)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Exercises 2.12 Write Python expressions corresponding to these statements: (a) The sum of the first seven positive integers (b) The average ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers