Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you solve it in python please question number 1 and 2 Question 1 Write a program to take an integer number from the user

image text in transcribedcan you solve it in python please

question number 1 and 2

Question 1 Write a program to take an integer number from the user and count the even and odd numbers in between. Compute and calculate the sum for the even and odd numbers separately. Finally display how many even and odd numbers are there, and the sum. Sample Output Between 0 and 10 we have 5 even numbers, and 6 odd numbers. Even sum: 25 Odd sum: 30 Question 2 Linna wants to approximate and predict her winning chances in a car raffle. Write a program that a the user to enter the number of participants and name it n. If n is less than 100, prompt an error messa Using for loop, implement the following equation to approximate the winning chances (a): n> 100 vux 1 1-1 a= =1 That translates to the following series: 1-1 1 1-2 1-3 Q = 1- [Mm x () + [nx + [nx + ... + (nx Note: the square root (V) is equivalent to x1/2. Sample Output Enter the number of participants: 1000 Your winning chance is: 63.25 % Duestion 3 rite a program that calculates the salary for company employees based on their ranks. ould ask the user to enter their ranks: (S)enior, (Junior, or (I)ntern (capital or small mber of working hours to calculate the salary. lidate the user's input for category type and display an error message if none of the ered. 2

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_2

Step: 3

blur-text-image_3

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago