Skip to content · ⁨דלג לתוכן⁩

The bigger number · ⁨המספר הגדול יותר⁩

English

The bigger number

a is 8 and b is 15. Store the bigger of the two in biggest. Do not use max.

A branch can set a variable, not only print. Give biggest a value on both paths, or one path leaves it undefined and Python says NameError.

עברית

המספר הגדול יותר

a הוא 8 וb הוא 15. שמור את המספר הגדול יותר מתוך שניים בbiggest. אל תשתמש בmax.

ענף יכול להגדיר משתנה, לא רק להדפיס. העניק לbiggest ערך על שני הדרך, או שענף אחד ישאיר אותו בלתי מוגדר ו-Python יאמר לך NameError.

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP