print("Hello") - Displays the text "Hello" on the screen. The print() function outputs text or other information., input("Press Enter to continue...") - Waits for the user to press Enter before proceeding. The input() function pauses the program until the user provides input., name = input("What is your name? ") - Asks the user for their name and stores the input in the variable name., print(“Hello ‘ + name) - Prints the word hello and the whatever was typed in as the name variable, if name == “Fred”: - Conditional (if statement). , if name != "Fred": - Checks to see if name is NOT Fred, from csinsc import * - imports the modules from CS in Schools to give more options, print(Colour.red + "This is red") - Prints the text in red colour, print(Highlight.yellow + "This is yellow") - Hightlights the text in yellow, print(Colour.reset + "Back to normal") - Resets text colour to default. , sleep(3) - Waits for 3 seconds, before the program continues, CS in Schools - The name of the website we are using , Python - The name of the programming language,
0%
Coding Recap
共享
共享
共享
由
09324879
Secondary
DigTech
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
匹配游戏
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?