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.
create a script to solve the volume of a sphere
output the volume of the sphere.
Create a program that can record the name, gender, and grades of a student in a certain subject. The grades consist of 1st, 2nd, 3rd, and 4th quarters.
The program should be able to do the following:
The program should use the following features:
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
I WANT VERY SIMPLE CODE
Write a function in this file called nine_lines that uses the function three_lines to print a total of nine lines
Assume that a grocery shop is introducing shopping through mobile. The shop keeper will gets the list of items from the customer through whatsApp. After receiving the list he will prepare the bill for the customer based on the availability of the items. That is, the shopkeeper will check whether the item is available or not by checking the stock in the shop, if the item is available he will add that item to the bill otherwise he will add that item to another list called not-available list. Finally the shopkeeper will send the bill and the not available list to the customer for confirmation. Write a python code to simulate mobile shopping for a grocery shop to generate bill and not available list. Hint : Create the stock list that contains item, unit price and available quantity.