Exercise 12: Prompting People

age = raw_input("How old are you? ")
height = raw_input("How tall are you? ")
weight = raw_input("How much do you weigh? ")
print "So, you‘re %r old, %r tall and %r heavy." % (
age, height, weight)
时间: 2024-08-29 13:34:30

Exercise 12: Prompting People的相关文章

C - The C Answer (2nd Edition) - Exercise 1-2

/* Experiment to find out what happens when printf's argument string contains \c, where c is some character not listed above. */ #include <stdio.h> main() { printf("hello world\y"); printf("hello world\7"); printf("hello wor

Exercise 14: Prompting And Passing

from sys import argv script, user_name = argv prompt = '> ' print "Hi %s, I'm the %s script." % (user_name, script) print "I'd like to ask you a few questions." print "Do you like me %s?" % user_name likes = raw_input(prom

Python Index

Table Of ContentsThe Hard Way Is EasierExercise 0: The SetupExercise 1: A Good First ProgramExercise 2: Comments And Pound CharactersExercise 3: Numbers And MathExercise 4: Variables And NamesExercise 5: More Variables And PrintingExercise 6: Strings

The C Programming Language——Exercise solutions of the chapter one (1st)

Recently,I have been reading the book The C Progrmming Lanuage(2nd Edition),which written by Dennis M.Ritchie and Brian W.Kernighan.The are many useful and elegant exercises in the book.Here is my solutions to the exercises of the first chapter but n

[Javascript] Ex: concatAll, map and filter

concatAll: Array.prototype.concatAll = function() { var results = []; this.forEach(function(subArray) { // ------------ INSERT CODE HERE! ---------------------------- // Add all the items in each subArray to the results array. // ------------ INSERT

new delete 直接管理的内存的规则

primer 5th 12.6练习代码 #include <iostream> #include <algorithm> #include<memory> #include<vector> using std::vector; using std::cin; using std::cout; using std::endl; vector<int>* factory(int i) { ; return new vector<int>{

MIT OS lab1

Lab 1: Booting a PC 1.Introduction Software setup Get jos code: athena% mkdir ~/6.828 athena% cd ~/6.828 athena% add git athena% git clone http://pdos.csail.mit.edu/6.828/2014-jos.git lab Cloning into lab... athena% cd lab Part 1: PC Bootstrap 1.1  

Thymeleaf基本知识

Thymeleaf是个XML/XHTML/HTML5模板引擎,可以用于Web与非Web应用. Thymeleaf的主要目标在于提供一种可被浏览器正确显示的.格式良好的模板创建方式,因此也可以用作静态建模.你可以使用它创建经过验证的XML与HTML模板.相对于编写逻辑或代码,开发者只需将标签属性添加到模板中即可.接下来,这些标签属性就会在DOM(文档对象模型)上执行预先制定好的逻辑.Thymeleaf的可扩展性也非常棒.你可以使用它定义自己的模板属性集合,这样就可以计算自定义表达式并使用自定义逻辑

MIT 6.828 学习笔记6 Lab4实验报告

Lab4实验报告 开始之前,为了弄懂 mpconfig 与 lapic,可能需要阅读 Intel processor manual 和 MP Specification,相关资源可以在课程中找到 Execrise 1 Implement mmio_map_region in kern/pmap.c. // mmio_map_region() uintptr_t ret = base; size = ROUNDUP(size, PGSIZE); base = base + size; if (ba