• 2022-06-09
    Python关键字elif表示__和__两个单词的缩写()
    A: else、if
    B: if 、else
    C: switch、case
    D: case、else
  • A

    内容

    • 0

      下列属于选择结构的语句是( ) A: If…else if … B: contiune C: If…else… D: Switch…case …

    • 1

      下列不是Python语言关键字的是( )。 A: else B: case C: lambda D: finally

    • 2

      Python关键字elif表示________和________两个单词的缩写

    • 3

      对于多分支的选择结构 可以使用( )语句实现 A: Switch…case … B: If…else if … C: If…else… D: contiune

    • 4

      请写出与以下else-if语句等价的switch语句。 if(choice == 1) price = 3.0; else if(choice == 2) price = 2.5; else if(choice == 3) price = 4.0; else if(choice == 4) price = 3.5; else{ price = 0.0; } switch { case 1: price=3.0; break; case 2: price=2.5; break; case 3:price=4.0;break; case 4: price=3.5;break; price=0.0; break; }