Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write and test a python program that requests a radius of a circle from the user and computes and displays the area, printed with two

  1. Write and test a python program that requests a radius of a circle from the user and computes and displays the area, printed with two decimal places of accuracy.

A= *r2

  1. Write a program to keep asking for a number until you enter a negative number. Print the sum and the average of all entered numbers at the end.

  1. Write and test a python program to calculate the maximum value of a list. The size and values of this list are entered by the user.

  1. Write and test a Python function named removeOddIndex() that is passed a String value. The function removes the characters which have odd index values of the given string and print the resulting new string.

  1. Write a Python function named printAsterisks that is passed a positive integer value m and prints out a line of m asterisks. If m is greater than 80, then only 80 asterisks should be displayed.

  1. Write a Python function named modCount that is given a positive integer, n, and a second positive integer m, m <= n, and returns how many numbers between 1 and n are evenly divisible by m.

  1. Write and test a Python function named validateReg() that is passed a number of intended registered credit hours for an upcoming semester and the current CGPA.

The function will print:

  • Registration failed, CGPA below the 2, contact your supervisor. if the CGPA is below 2.
  • Registration failed, registered credit hours less than 6. If the number of credits is less than 6 credits
  • Registration failed, registered credit hours above 15 . If the number of credits is more than 15 credits
  • Registration successful, number of registered credits is = (number of credits). Otherwise

  1. Write and test Python program where the user has only three attempts to enter the correct password of an account. You set the password as a constant. When the password is correct the program should display Correct, welcome back. Otherwise, it should display Incorrect, try again.. When all attempts are consumed it should display Sorry, you have been locked out.

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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions