Python Answers

Questions answered by Experts: 5 288

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

That's Odd

by CodeChum Admin

Well, that's odd, or is it? It's your job to find out!


Instructions:

  1. Input one integer.
  2. Print out the integer in one line.
  3. Check whether the integer is odd or not. If it is odd, print "Odd".

Instructions

  1. Input one integer.
  2. Print out the integer in one line.
  3. Check whether the integer is odd or not. If it is odd, print "Odd".

Input

A line containing an integer

5

Output

The first line contains the inputted integer.

The second line contains a string which is the result.

5
Odd




5. Even Out

by CodeChum Admin

You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha!

Now, let's try this one more time! 


Instructions:

  1. Input two integers in one line, separated by a space. The first integer shall represent the starting point, and the other, the ending point.
  2. Print out all even numbers that are within the range of the starting and ending point (inclusive or including the ending point).

Input

A line containing two integers separated by a space.

5·10

Output

A line containing integers separated by a space.

6·8·10







Let's play a game of FizzBuzz! It works just like the popular childhood game "PopCorn", but with rules of math applied since math is fun, right?


Just print out "Fizz" when the given number is divisible by 3, "Buzz" when it's divisible by 5, and "FizzBuzz" when it's divisible by both 3 and 5!


Let the game begin!




run at pycharm community

PYTHON CREATING CLASS AND ATTRIBUTE :







1. Create a Class and initialize attribute of the following:




Class name: Student




Attribute: First Name




Last Name




Sex




Age







2. From the created class, create 5 objects, and display it using pretty table.

Write a program that calculates and prints

the take-home pay for a commissioned sales

employee. Allow the user to enter values for the

name of the employee and the sales amount


Write a python program that reads a sentence


Programming

Write a program that calculates and prints

the take-home pay for a commissioned sales

employee. Allow the user to enter values for the

name of the employee and the sales amount

for the week. Employees receive 7% of the

total sales. Federal tax rate is 18%. Retirement

contribution is 15%. Social Security tax rate is 9%.

Use appropriate constants. Write input, display,

and calculation methods. Your final output should

display all calculated values, including the total

deductions and all defined constants.



Write a program to computer the are of a circle,(A=ñr2,ñ=3.14

Write a program that determine the magic word (if the input number is 143,it displays I LOVE YOU else I HATE YOU).



Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.



The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:








def new_line():








print('.')








def three_lines():








new_line()








new_line()








new_line()



You must execute your script and paste the output produced into a document that you will submit along with your Python script.



It is very helpful if you print a placeholder between the printing of 9 lines and the printing of 25 lines. It will make your output easier to read for your peer assessors. A placeholder can be output such as “Printing nine lines” or “Calling clearScreen(







LATEST TUTORIALS
APPROVED BY CLIENTS