Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6985477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:41:07+00:00 2026-05-27T18:41:07+00:00

class Phone: def __init__(self): self.types = [Touch Screen,Flip, Slider, Bar, Bag] self.brand = No

  • 0
class Phone:
    def __init__(self):
        self.types = ["Touch Screen","Flip", "Slider", "Bar", "Bag"]
        self.brand = "No Brand Determined"
        self.type_of_phone = "No Type of Phone has been selected"

    def get_type(self):
        return self.type_of_phone
    def change_type(self, changeTo):
        if self.check_type(changeTo):
            self.type_of_phone = changeTo
        else:
            print("The Type you wish to change the phone to is not a supported type.")

    def change_brand(self, changeTo):
        self.brand = changeTo


    def check_type(self, inQuestion):
        if inQuestion in self.types:
            return True
        return False
    def toString(self):
        return "Brand: "+self.brand+"\nType: "+self.type_of_phone+"\n"

    def menu(self):
        self.intro()
        while True:
            self.mainScreen()

    def intro(self):
        print("This program will let you create a cell phone type and brand.")

    def mainScreen(self):
        option = input(print("(1) See your phone specs \n(2) Change information\n Enter a Number: "))
        if option == "1":
            print("\n"+self.toString())
        elif option == "2":
            self.changeScreen()
        else:
            print("Enter 1 or 2. Please.")

    def changeScreen(self):
            option = input(print("\nWould you like to change the...\n(1) Type\n(2) Brand\n Enter a Number: "))
            if option == "1":
                self.changeMyType()
            elif option == "2":
                self.changeMyBrand()
            else:
                print("Enter 1 or 2")
                self.changeScreen()


    def changeMyType(self):
        optionType = input(print("\nThese are your options of phones: \n",self.types,"\nEnter an option [case sensitive]: "))
        self.change_type(optionType)

    def changeMyBrand(self):
        optionBrand = input(print("\nEnter the Brand you would like your phone to be: "))
        self.change_brand(optionBrand)



def main():

    #commands created that fully work:
    #Types of Phones to change to: Touch Screen, Flip, Slider, Bar, Bag
    #get_type()
    #change_type()

    myPhone = Phone()
    myPhone.menu()
main()

Run this python file. When I run it I get None printed after every print. I don’t understand why. I know that when your function in python doesn’t have a return it will return None, but I don’t understand what is going on here. Any other feed back is great too. Right now I have an object Phone that has a menu and other stuff. Tell me if there’s another way you would approach this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:41:08+00:00Added an answer on May 27, 2026 at 6:41 pm

    Everywhere you see input(print("...")), change that to input("..."). My guess is that it was getting caught up in the print() function, and would happily print None.

    Be sure to also tag this as python3.x, as this is definitely not a 2.x question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Rails 2.3.5. Class User < ActiveRecord::Base has_many :phones end class Phone
Say I have a Date, or a Phone number, or some Class which I
I'm saving contacts (email, mobile phone, ICQ, AIM etc.) for people like this: class
class Foo { static bool Bar(Stream^ stream); }; class FooWrapper { bool Bar(LPCWSTR szUnicodeString)
I'm Java person who just started learning Python. Take this example: class Person(): def
I have the following 2 tables defined in migrations class CreateUsers < ActiveRecord::Migration def
class Tag(models.Model): name = models.CharField(maxlength=100) class Blog(models.Model): name = models.CharField(maxlength=100) tags = models.ManyToManyField(Tag) Simple
class A : IFoo { } ... A[] arrayOfA = new A[10]; if(arrayOfA is
class someclass {}; class base { int a; int *pint; someclass objsomeclass; someclass* psomeclass;
class Foo(models.Model): title = models.CharField(max_length=20) slug = models.SlugField() Is there a built-in way to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.