Professional Documents
Culture Documents
Quiz 3
Quiz 3
Code Once
Introduction to Computers
Laboratory Manual
Quiz #3
The Islamic University of Gaza Student Name: _____________________
Engineering Faculty Student ID: ________________________
Department of Computer Engineering Introduction to Computers
Fall 2017 LNGG 1003
Khaleel I. Shaheen
Quiz #3
Question 2) Write a Python program that uses an if statement to find the smallest of three
given integers. (The user should enter the three numbers).
Question 3) Write a program that reads an unspecified number of integers, determines how
many positive and negative values have been read, and computes the average of the input
values. Your program ends with the input 0. Print the average in float format.
Question 4) Write a function that computes the sum of the digits in an integer. Use the
following function header:
def sum_digits(n):
Do the best,
Forget the rest.