Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4: Write a program that receives 8 positive numbers from the user. Make sure you have 8 positive number at the end. Each time

image text in transcribed

image text in transcribed

image text in transcribed

Question 4: Write a program that receives 8 positive numbers from the user. Make sure you have 8 positive number at the end. Each time the user enters a negative or string, print a message. 1. Display, the average of 8 positive numbers collected, the sum of all positive odd numbers and the maximum of the 8 positive numbers. 2. Determines how many of them are prime, composite or neither prime or composite and prints the message. Do not use Python's internal functions for sum, average and maximum. Question 5: Write a Python program that accepts an integer (b) 1. Computes the value of 2b+3bb+1.5bbb. 2. Compute sum of the first b positive integers (if the number is negative convert it to positive). Question 6: Write a program that takes as input two points: (x1,y1) and (x2,y2) - float or integer only. Finally, the user is prompted for a third point (x3,y3). The program should find the distance between the points (x1,y1) and (x3,y3) and the points (x2,y2) and (x3,y3). At the end of each run, the user should be prompted to ask whether then want to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions