编辑代码

# coding:utf-8
#JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 

class Phone:

    __is_5G_enable: bool = False

    def __check_5G(self):
        if self.__is_5G_enable == True: print("5G网络已开启") 
        else: print("5G关闭,使用4G网络")
        return

    def call_by_5G(self):
        self.__check_5G()
        print("正在通话中——")
        return

phone1 = Phone()
phone1.call_by_5G()