Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the python code for 8-10? 2020 SPRING SYS 120 LAB 04.docx Locked Courier Now Regular Di 12 19 1.0 cintc 10 1 2

image text in transcribed What is the python code for 8-10?
2020 SPRING SYS 120 LAB 04.docx Locked Courier Now Regular Di 12 19 1.0 cintc 10 1 2 la 12 15 6 17 L04-08. Given the following original insurance premium calculation code, modify it so that gender is required as a third parameter. Female drivers' rates should be calculated at 2/3 of the original premium rate if the female driver is less than 21. Male drivers' rates should be doubled if they are less than 21. det calcAuto Premium (age. TROREA): Spoti it age21). Remember, errors tend to occur at boundaries. (Use at least a nested for-loop to implement this. A triply nested one is even better!) L04-10. "Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible ockDo by 100, but these centul years are leap years if they are exactly divisible by 400. For example, the years Brows 1700, 1800, and 1900 are not leap years, but the years 1600 and 2000 are," en.wikipedia.org) wiki Leap year Write a program that asks the user for a year. The program should print out whether or not that year is a leap year, per the rules stated above. The program should continue asking the user to input a year and printing the assessment of leap year or not for 5 iterations. Write a function def is Leap Year(year): that accepts the year as an integer argument and returns True or False as the return value from the function. The main function should use this to determine what to print for the determination of leap year or not. 104-11. Write a function called showASCH that accepts a string as an argument. It should print the character Sonus: and the ASCII value for cach character in the string. For instance: One >>> showASCII ("ABCD") A-65 3-66 C-67

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago