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

"Even" Now

by CodeChum Admin

I'm really fond of even numbers, you know? That's why I'll be letting you make another even number problem yet again. This time, you need to print from a range of two inputted numbers, n1 and n2 (inclusive), all the even numbers from n2 down to n1, in descending order.

How about that?


Input

A line containing two integers separated by a space.

3·10

Output

Multiple lines containing an integer.

10
8
6
4




SAMPLE OUTPUT: Input your first name: John Input your last name: Doe Input your course: 3515 Input your address: Sta. Cruz, Tinambac, C.5. Input your birth year: 1999. Hello John Doe, you are a BSIS student from Sta Cruz, Tinambac, C.S. your age is 22

Write a program that reads a string and returns a table of the letters of the alphabet in

alphabetical order which occur in the string together with the number of times each letter

occurs. Case should be ignored. A sample output of the program when the user enters the data

“ThiS is String with Upper and lower case Letters”, would look this this:


a 2

c 1

d 1

e 5

g 1

h 2

i 4

l 2

n 2

o 1

p 2

r 4

s 5

t 5

u 1

w 2


write a python program that accepts a quiz average, midterm grade, and final grade. Compute


the numerical grade , nm= ( quiz average + midterm grade + final grade)/3 and converts it to an equivalent letter


grade, and displays the letter grade. Use appropriate message for the program

Write a python program that prompt the user for two numbers read them in and print out the product labelled

class Option:


def __init__(self):


self._firstnum = 0


Question:


1. what is the error in this code?


Write a program that reads an unspecified number of integers, determines how many positive

and negative values have been read, and computes the total and average of the input values (not

counting the zero). The program ends with the input 0. Display the average as a floating-point number


Create a class representing a student. Include characteristics as student, number, first and last name, overall GPA, 

classification, and major. Write at least 1 default constructor. Include properties for each of the data items. 

Create a second class that instantiates the first class with information about yourself. In the second class, create a 

method that displays your name and GPA. 


1.Reverse string using stack in python

 

import stack

 

string = 'arewen  ekil  I'

reversed_string = ''

s = stack.Stack()

 

# your solution here

 

print(reversed_string)


Create a python program that will ask the student's full name as well as grades in Chemistry, Biology, English, Physics, and Arts. Following that, it will produce an output of its General Weighted Average (GWA) with its equivalent based on the grades inputted.


LATEST TUTORIALS
APPROVED BY CLIENTS